R19 Python Lab Manual
R19 Python Lab Manual
Write a program that asks the user for a weight in kilograms and converts
it to pounds. There are 2.2 pounds in a kilogram.
Program :
print("weight in pounds",pounds)
Output :
2.Write a program that asks the user to enter three numbers (use three
separate input statements). Create variables called total and average that hold
the sum and average of the three numbers and print out the values of total
and average.
Program:
total=n1+n2+n3
average=(total)/3
print("Total={},Average={}".format(total,average))
Output:
3. Write a program that uses a for loop to print the numbers 8, 11, 14, 17, 20, . . . ,
83, 86, 89.
Program :
for i in range(8,90,3):
print(i,end="\t")
Output: