Python Fundamentals
Python Fundamentals
1. Write a program that displays a joke. But display the punchline only when the
user presses enter key. (Hint. You may use input()).
2. Write a program to read today's date (only del part) from user Then display how
many days are left in the current month.
5. Write the program with maxımum three lines of code and that assigns first 5
multiples of a number to 5 variables and then print them.
6. Write a Python program that accepts radius of circle and prints its area.
7. Write Python program that accepts marks in 5 subjects and outputs average marks.
8. Write a short program that asks tor your height in centimetres and then converts
your height to feet and inches. (1 foot = 12 inches, 1inch =2.54 cm).
12. Write a program to input a number and print its first five multiples.
13. Write a program to read details like name, class, age of a student and then
print the details firstly in same line and then in separate lines. Make sure to
have two blank lines in these two different types of prints.
14. Write a program to input a single digit(n) and print a 3 digit number created
as <n(n + 1)(n + 2)> e.g., if you input 7 then it should print 789. Assume that the
input digit is in range 1-7.
15. Write a program to read three numbers in three variables and swap first two
variables with the sums of first and second, second and third numbers respectively.