Python Practice Set - 1

 Python Practice Set - 1

Learn Python from the Course section and practice here to make it strong.
This is practice set -1 in which I will discuss some basic questions based on arithmetic operations and input output. 



Q 1. Write a program to input radius of a circle and display its Area and Perimeter.

Solution:-

r = float(input("Enter Radius"))
A = 3.14 * r**2
P = 2 * 3.14 * r
print("Area of circle is", A)
print(“Perimeter of circle is", P)




Q 2. Write a program to input two numbers and print quotient and remainder.

Solution:-

a = int(input("Enter one number"))
b = int(input("Enter second number"))
print("Quotient", a//b)
print("Remainder", a%b)




Q 3. Write a program to input temperature in Celsius and convert into Fahrenheit.  
Given: 1.8 * C + 32

Solution:-

c = float(input("Enter temp in celsius"))
f = (9/5)*c + 32
print("Temp in  Fahrenheit ",f )




Q 4. Write a program to input total minutes and print its equivalent hours and minute.

Solution:-

minutes = int(input("Enter minutes"))
hour = minutes // 60
minute = minutes % 60
print(hour, "Hour", minute, "Minutes")




Q 5. Write a program to input total seconds and convert into hours, minutes and seconds.

Solution:-

sec = int(input("Enter seconds"))
minutes = sec // 60
seconds = sec % 60
hour = minutes // 60
minute = minutes % 60
print(hour, "Hours", minute, "Minutes", seconds, "Seconds")




Download the notes and solution of practice set from practice set from the description of the video available on the channel "Bhavik Agarwal" - Channel Link in footer bar.


Enjoy The Learning

Subscribe to the Channel and press the bell icon for latest updates.
Check Out the Projects Section for various interesting projects and games build with Python.

For any doubts feel free to ask in comments below.
Stay Connected to Us for more such Courses and Projects.

Post a Comment

For any doubts feel free to ask in comments below.
Stay Connected to Us for more such Courses and Projects.

Post a Comment (0)

Previous Post Next Post