Write a program that prompts the user for a number from 1 to 20 until the number 20 is encountered. Not including the 20, calculate the maximum value.
Can someone help me to write a code ?
inp = 0
x = 9999
while inp != 20:
inp = int(input("Please enter a number from 1 to 20 (20 to stop): "))
print(inp)
if inp != 20:
print("the maximum value is", inp)
I am stuck