Python Practice Questions 1
Python Practice Questions 1
1. Write a python program to input a number and find the square and display the square.
2. Write a python program to input two numbers and find the sum of two numbers and display
the sum.
3. Write a python program to find largest of three numbers using simple if statement.
4. Write a python program to check whether the entered year is leap year.
5. Write a python program to find sum of digits of a number using while loop.
6. Write a program to check a number is palindrome or not using while loop.
7. Write a program to check a number is Armstrong number or not using while loop.
8. Write a program to find the factorial of a number using for loop.
9. Write a program to display all the elements of a list using a loop.
10. Write a program to display all the elements of a list using index.
11. Write a program to print elements of a list are even number or odd number.
12. Write a program to print elements of a list are palindrome or not.
13. Write a program to find sum of all the elements of a list.
14. Write a program to reverse a list using range() function.
15. Write a program to reverse a list using slicing method.
----------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
21. Write a python program to print count of Armstrong numbers present in the list.
22. Write a python program to print the numbers ends with digit 8 in a list.
23. Write a python program to print sum of numbers divisible by 3 in a list.
24. Write a python program to find sum of each second number in the list.
25. Write a python program to generate Fibonacci series up to a limit.