KEMBAR78
Python 100 Practice Questions | PDF | Matrix (Mathematics) | String (Computer Science)
0% found this document useful (0 votes)
22 views3 pages

Python 100 Practice Questions

Uploaded by

heymanish30
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)
22 views3 pages

Python 100 Practice Questions

Uploaded by

heymanish30
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/ 3

100 Python Practice Questions (Beginner to

Arrays)
1. Print 'Hello World' on the screen.
2. Create variables of different data types (int, float, string) and print them.
3. Take two numbers as input and print their sum.
4. Write a program to swap two numbers.
5. Check whether a number is even or odd.
6. Find the largest of two numbers.
7. Find the largest of three numbers.
8. Check if a number is positive, negative, or zero.
9. Take a string input and print its length.
10. Print the first and last character of a string.
11. Reverse a string without using built-in functions.
12. Count vowels in a given string.
13. Check if a string is a palindrome.
14. Concatenate two strings.
15. Convert a string to uppercase.
16. Convert a string to lowercase.
17. Replace spaces with underscores in a string.
18. Find the ASCII value of a character.
19. Take an integer input and print its square.
20. Take an integer input and print its cube.
21. Generate multiplication table of a number.
22. Print numbers from 1 to 10 using a for loop.
23. Print numbers from 10 to 1 using a while loop.
24. Calculate the sum of first 10 natural numbers.
25. Find factorial of a number.
26. Find the sum of digits of a number.
27. Check if a number is prime.
28. Print all prime numbers between 1 and 100.
29. Find the greatest common divisor (GCD) of two numbers.
30. Find the least common multiple (LCM) of two numbers.
31. Generate Fibonacci series up to n terms.
32. Check if a number is in Fibonacci series.
33. Find the reverse of a number.
34. Check if a number is palindrome.
35. Check if a number is Armstrong number.
36. Count the number of digits in a number.
37. Find the sum of even digits in a number.
38. Find the sum of odd digits in a number.
39. Print all even numbers from 1 to 50.
40. Print all odd numbers from 1 to 50.
41. Take marks of 5 subjects and find average and percentage.
42. Find grade of a student based on percentage.
43. Print all ASCII characters from 65 to 90.
44. Print all ASCII characters from 97 to 122.
45. Print the first 10 multiples of 5.
46. Print the square of first 10 natural numbers.
47. Print the cube of first 10 natural numbers.
48. Find sum of squares of first 10 natural numbers.
49. Find sum of cubes of first 10 natural numbers.
50. Take n numbers as input and print their sum.
51. Take n numbers as input and find their average.
52. Find the maximum of n numbers.
53. Find the minimum of n numbers.
54. Print all factors of a number.
55. Check if a number is perfect number.
56. Check if a number is strong number.
57. Check if a number is Harshad number.
58. Print Pascal’s triangle up to n rows.
59. Print Floyd’s triangle up to n rows.
60. Print a right-angled triangle star pattern.
61. Print a pyramid star pattern.
62. Print an inverted pyramid star pattern.
63. Print a diamond star pattern.
64. Print a hollow square star pattern.
65. Print a hollow triangle star pattern.
66. Take a list of numbers and print them.
67. Find the sum of elements in a list.
68. Find the maximum element in a list.
69. Find the minimum element in a list.
70. Find the average of elements in a list.
71. Count even and odd numbers in a list.
72. Find second largest element in a list.
73. Find second smallest element in a list.
74. Sort a list in ascending order.
75. Sort a list in descending order.
76. Remove duplicates from a list.
77. Find frequency of each element in a list.
78. Check if an element exists in a list.
79. Merge two lists.
80. Find common elements in two lists.
81. Find the union of two lists.
82. Find the difference between two lists.
83. Reverse a list without using built-in function.
84. Rotate a list by k elements.
85. Split a list into two halves.
86. Find sum of elements at even index in a list.
87. Find sum of elements at odd index in a list.
88. Take a matrix (2D list) input and print it.
89. Find sum of all elements in a matrix.
90. Find maximum element in a matrix.
91. Find minimum element in a matrix.
92. Transpose a matrix.
93. Add two matrices.
94. Subtract two matrices.
95. Multiply two matrices.
96. Find the sum of diagonal elements of a matrix.
97. Check if a matrix is symmetric.
98. Check if a matrix is identity matrix.
99. Print boundary elements of a matrix.
100. Search an element in a matrix.
101. Print row-wise sum of a matrix.
102. Print column-wise sum of a matrix.

You might also like