1.
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 :
kilo = float(input("Enter weight in kilograms"))
pounds = 2.2 * kilo
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:
n1=int(input("Enter first number"))
n2=int(input("Enter first number"))
n3=int(input("Enter first number"))
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: