Certificate
Certificate
_______________
Internal Examiner
1. Take three number as input and display their sum and product on
screen.
2. Take two numbers as input. Convert these numbers to positive numbers
if they are negative numbers, convert them into negative numbers if
they are positive numbers.
3. Write a program to find area of rectangle.
4. Write a program to convert kilometers to miles in Python.
5. Write a program to convert Kelvin measurements to Celsius
6. Write a program to convert Celsius measurements to Fahrenheit.
7. Write a program to convert feet measurements to inches.
8. Write a program to find if someone is eligible to vote (age>18).
9. Write a program to find max of three numbers.
10. Write a program to basic calculator.
11. Write a program to swap the numbers.
12. Write a program to find sum and average of first N numbers.
13. Write a program to print a multiplication table of entered number
14. Create a Python program to print factorial of any number .
15. Print the pattern
*
**
***
16. Create a Python list with three items. Print the data types of these items.
17. Create a Python list containing the first 5 positive even numbers.
Display the list elements in the descending order.
18. Take three numbers as input from the user. Store these numbers in a
list. Display their product on the screen.
19. Take three names as input from the user. Store these names in a list.
Shift all three names to a single variable and delete the list.
20. Write a Python code to print squares of numbers 1 to 5 using list and
range function.
Q.1 Take three numbers as input and display their sum and product on the
screen
sum=num1+num2+num3
product=num1*num2*num3
Output:
if num1 < 0:
else:
if num2 < 0:
else:
print("Converted numbers:")
Output:
Converted Numbers
Number 1: -5
Number 2: 2
Q.3 Write a program to find area of rectangle.
# Taking input from the user for length and breadth of the rectangle
Output:
conversion_factor = 0.621371
Output:
Output:
Output:
inches = feet * 12
Output:
else:
Output:
max_num = a
max_num = b
else:
max_num = c
Output:
if operation == '+':
result = a + b
result = a - b
result = a * b
result = a / b
else:
print("Result:", result)
Output:
Result: 56.0
Q.11 Write a program to swap the numbers.
temp = a
a=b
b = temp
Output:
sum_N = N * (N + 1) // 2
average = sum_N / N
Output:
Enter a number: 6
Output:
Enter a number: 7
7x1=7
7 x 2 = 14
7 x 3 = 21
7 x 4 = 28
7 x 5 = 35
7 x 6 = 42
7 x 7 = 49
7 x 8 = 56
7 x 9 = 63
7 x 10 = 70
Q.14 Create a Python program to print factorial of any number .
factorial = 1
if num < 0:
elif num == 0:
else:
factorial = factorial*i
Output:
Enter a number: 8
**
***
print("* " * i)
Output:
**
***
Q.16 Create a Python list with three items. Print the data types of these items.
print (type(element))
Output:
<class 'str'>
<class 'int'>
<class 'float'>
Q.17 Create a Python list containing the first 5 positive even numbers. Display
the list elements in the descending order.
Output:
Output:
del names_list
Output:
#Squares of Numbers 1 to 5:
Output: