0% found this document useful (0 votes)
13 views4 pages

Python User Input Number Programs

Uploaded by

shivgtijare
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)
13 views4 pages

Python User Input Number Programs

Uploaded by

shivgtijare
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

#ACCEPT 3 NUMBERS FROM THE

USER AND PRINT THE MAXIMUM


#Accept one from the user and print
if its odd or even
a=int(input(“Enter the first number”))
b=int(input(“Enter the second
number”))
c=int(input(“Enter the second
number”))
if(a>b) and (a>c):
print(a, ” is the the greatest number”)
if(b>a) and (b>c):
print(b, ” is the the greatest number”)
if(c>a) and (c>b):
print(c, ” is the the greatest number”)
#Accept one from the user and print
if its odd or even

a=int(input(“Enter the first number”))


if a%2==0:
print(a, “ is an even number “)
else
print(a, “ is an odd number “)

#Accept the marks and print the


Grade If marks >35 the “Pass” else
Fail
marks=int(input(“Enter your marks”))
if marks >=35:
print(“You have passed”)
else:
print(“You have failed”)

similar programs
Marks Grade
>=85 A
>=75 B
>=65 C
<65 Fail

marks=int(input(“Enter your marks”))


if marks >=85:
print(“Grade A”)
elif marks>=75:
print(“Grade B”)
elif marks>=65:
print(“Grade C”)
else
print(“Fail”)

You might also like