Python Practise Question
1. Write a Program to input 3 number and print their sum , subtraction , multiplication,
modulus (all number should be user input)
2. Write a program to input the side of a square & print its area (area of square = Side *
Side).
3. Write a program to input 2 floating point number & print their average.
4. Write a program to input 3 number and find which number is largest
5. Write a Python program that determines if a given year is a leap year. A year is a leap
year if:
It is divisible by 4
It is not divisible by 100, unless it is also divisible by 40
6. Write a Python program that converts temperature from Celsius to Fahrenheit or vice
versa based on user input. If the user inputs 'C', convert from Celsius to Fahrenheit; if
'F', convert from Fahrenheit to Celsius. ( See formula from Internet)
7. Write a Python program that checks if a person is eligible to vote. A person is eligible
to vote if they are at least 18 years old and are a citizen. The program should take the
age and citizenship status as input and print whether the person is eligible to vote or
not.
8. Write a Python program to check if a student is eligible for a scholarship. The criteria
for the scholarship are:
The student must have a GPA of 3.5 or higher.
The student must be involved in at least one extracurricular activity.
9. Write a Python program that simulates a login system. The program should ask for a
username and password. The login is successful if the username is "admin" and the
password is "password123". Print "Login successful" if the login is successful,
otherwise print "Login failed."
[Link] a Python program that determines if a number is even or odd using the ternary
operator. Print "Even" if the number is even, otherwise print "Odd".
[Link] a Python program that finds the maximum of two numbers using the ternary
operator. Print the maximum value.
[Link] the ternary operator to determine whether a given number is positive, negative,
or zero.
[Link] the ternary operator to find the smallest of three given numbers.
[Link] a Python program that checks if at least one of two conditions is true: a number
is greater than 10 or the number is even.
[Link] a Python program to check if a number is between 10 and 20 (inclusive) using
logical operators.