I write a code in python to ask a user to input a number and check if is it less than or equal to zero and print a sentence then quit or otherwise continue if the number is positive , also it checks if the input is a number or not
here is my code
top_of_range = input("Type a number: ")
if top_of_range.isdigit():
top_of_range = int(top_of_range)
if top_of_range <= 0:
print ("please enter a nubmer greater than 0 next time.")
quit()
else:
print(" please type a number next time.")
quit()
-counts as a digit.