Python Forum
"Call the subroutine in order to check..." - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: "Call the subroutine in order to check..." (/thread-5235.html)



"Call the subroutine in order to check..." - misa_san - Sep-24-2017

The following subroutine returns a value to the main program
SUBROUTINE checkval (value, low, high)
IF value < low THEN
RETURN “Low”
ELSE IF value > high
RETURN “High”
ELSE
RETURN “OK”
ENDIF
ENDSUBROUTINE

In the main program, the following statements are written.

OUTPUT (“Please enter measurement:”)
measurement  USERINPUT

Write one or more statements which will call the subroutine in order to check whether the measurement is between 18 and 25, and output the result.


This is a question on my homework, but I haven't been taught how to do this by my teacher, so I'm clueless. Could someone explain how to do this? Thanks.


RE: "Call the subroutine in order to check..." - stranac - Sep-24-2017

That doesn't look like python at all.
If I had to guess, I'd say it's VB.