Python Programs
Python Programs
a = int(input("Enter a? "))
b = int(input("Enter b? "))
c = int(input("Enter c? "))
if a>b and a>c:
print("a is largest")
if b>a and b>c:
print("b is largest")
if c>a and c>b:
print("c is largest")
3.Program to accept numbers from the user and display the code
n = int(input("Enter n: "))
sum = 0
i=1
while i <= n:
sum = sum + i
i = i+1
print("The sum is", sum)