Python Forum
"Call the subroutine in order to check..."
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Call the subroutine in order to check..."
#1
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.
Reply
#2
That doesn't look like python at all.
If I had to guess, I'd say it's VB.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020