0% found this document useful (0 votes)
2 views2 pages

Python Practice Questions

The document contains 30 beginner-level Python practice questions designed to enhance programming skills. The questions cover various topics including basic arithmetic, control structures, functions, and data types. Each question encourages the application of fundamental Python concepts to solve practical problems.

Uploaded by

toxicteenxx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Python Practice Questions

The document contains 30 beginner-level Python practice questions designed to enhance programming skills. The questions cover various topics including basic arithmetic, control structures, functions, and data types. Each question encourages the application of fundamental Python concepts to solve practical problems.

Uploaded by

toxicteenxx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

30 Python Practice Questions (Beginner Level)

1. Write a Python program to display your name, age, and city.

2. Take two integers as input and print their sum.

3. Calculate the area of a rectangle (length x breadth).

4. Convert kilometers to miles.

5. Take the user's name and greet them with "Hello, <name>!"

6. Find the average of three numbers.

7. Convert seconds into minutes and seconds (e.g., 90 seconds -> 1 minute 30 seconds).

8. Calculate the simple interest: SI = (P x R x T) / 100.

9. Find the cube of a number using a function.

10. Take a float number and show its square root using exponentiation (** 0.5).

11. Check if a number is positive, negative, or zero.

12. Check if a number is even or odd.

13. Take marks of 3 subjects and calculate the grade:

- 90+: A

- 80-89: B

- 70-79: C

- Else: Fail

14. Check if a year is a leap year.

15. Find the greatest of three numbers.

16. Print numbers from 1 to N.

17. Print the multiplication table of a given number.

18. Calculate the sum of first N natural numbers.

19. Calculate factorial of a number using a loop.

20. Reverse a number (e.g., 123 -> 321).

21. Define a function that adds two numbers.


22. Write a function that returns whether a number is prime.

23. Write a function to return the factorial of a number.

24. Write a function to find the average of a list of numbers.

25. Write a function that returns the square and cube of a number.

26. Count the number of digits in a number.

27. Check if a number is a palindrome.

28. Print the Fibonacci series up to N terms.

29. Check if a character is a vowel or consonant.

30. Write a program that asks for age and checks if the user is eligible to vote (age >= 18).

You might also like