Академический Документы
Профессиональный Документы
Культура Документы
14
print (“Hello” * 2)
interest.
4J( Write a program that takes sales for four quarters and then
displays total sales
z=x/y*y
print (z)
Ans: 4.0
Q.6 WAP to take value of x,y,z from the user and calculate the equation 4x4
+ 3$ + 9z2 + 6u
y=int(input(”Enter y : “))
z=int(input(”Enter z : “))
Q.7 WAP to take the temperatures of all 7 days of the week and displays the
average
avg= (dl+d2+d3+d4+d5+d6+d7) /7
Q.2 What are loops in Python? How many types of loop are there in Python?
depending upon a condition test. Loops has three basic elements within it
to repeat the statements —
. Initialization (Start)
. Updation (Step)
If condition 1:
elif condion2: