0% found this document useful (0 votes)
4 views1 page

Python Input Validation and Division

Uploaded by

kangc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Python Input Validation and Division

Uploaded by

kangc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

name = input("name: \n")

x = [Link]()
print (x)

----------------------------------------------------------------------------------------------------------------------------

number = int(input("age? \n"))

while number <= 1 or number >= 99:


print("False")
Break

else :
print(str(number) + " is True")
name1 = input("first name: \n")
x = [Link]()
name2 = input("last name: \n")
y = [Link]()
print (x,y)

----------------------------------------------------------------------------------------------------------------------------

num1 = int(input("first num: \n"))


num2 = int(input("second num: \n"))
if num2<=0:
print("invalid")
exit()
print(num1/num2)

----------------------------------------------------------------------------------------------------------------------------

You might also like