Python Programming Questions Class IX
Python Programming Questions Class IX
Write a Python program to take a name as input and greet the user with "Hello, [name]!".
2. 2. Arithmetic Operations:
Create a program to input two numbers and display their sum, difference, product, and
quotient.
3. 3. Swapping Variables:
Write a Python program to swap two variables without using a third variable.
4. 4. Area of a Circle:
CONDITIONAL STATEMENTS:
6. 6. Even or Odd:
Create a program that takes a percentage as input and outputs the grade based on the
criteria:
- ≥90: A
- 80-89: B
- 70-79: C
- 60-69: D
- <60: F
8. 8. Leap Year Checker:
Write a program that takes the user's age as input and displays whether they are eligible to
vote (age ≥ 18).
10. 10. Largest of Three Numbers:
Write a program to generate the multiplication table of a given number using a for loop.
12. 12. Sum of Natural Numbers:
Create a program to find the sum of all natural numbers up to a given number using a while
loop.
13. 13. Factorial Calculation:
Write a program to count the number of digits in a given number using a while loop.
15. 15. Reversing a Number:
COMBINED CONCEPTS:
16. 16. Prime Number Checker:
Develop a program to check whether a given number is an Armstrong number (e.g., 153 =
1³ + 5³ + 3³).