EXAM Python 843i_Questions
EXAM Python 843i_Questions
1. Python 20
2. SQLite 20
3. Python_SQLite 20
4. HTML 20
Python
1. Write a Python program that calculates the sum of areas of two rectangles. The
program should take input for the length and width of the rectangles.
2. Write a Python program that calculates the area of a circle. The program
should take input for the radius of the circle.
3. Write a Python program that calculates the area of a triangle. The program
should take input for the length of the base and the height of the triangle.
4. Write a program that takes a number as input and prints whether it is positive,
negative, or zero.
5. Write a program that takes a number as input and prints whether it equals my
number (f.e.10).
6. Create a program that asks for a student's marks and determines their grade
based on the following:
7. Write a program that takes an integer as input and outputs the factorial of the
number.
8. Write a program that takes two integers as input and outputs the sum of their
factorials.
9. Write a program that takes three integers as input and outputs the sum of their
factorials.
10. Write a program that takes a number as input and calculates:
Sin2 x + Cos2 x
11. WriteAa program that takes a number as input and calculates:
12. Write a program that takes numbers x and y as input and calculates:
A=X2+Y2+(X+12)Y
13. Write a program that takes numbers x and y as input and calculates:
A=X2+Y2+(X+12)Y
14. Write a program that takes numbers r, n and t as input and calculates:
( )
nt
r
A=4 1+
n
15. Create a program that takes a number as input and determines is the number
odd or even
16. Create a program that calculates the sum of all even numbers between 1 and
100.
17. Create a program that calculates the sum of all odd numbers between 1 and
100.
18. Create a program that calculates number of days between today and date the
user inputs.
19. Create a program that calculates number of days between 2 dates the user
inputs.
20. Write a program that asks the user for 5 numbers, stores them in a list, and
then prints the largest and smallest numbers from the list.