Week 1: Introduction to Python
Questions:
1. What is Python?
2. Who created Python?
3. Name three features of Python.
4. What are the applications of Python?
5. How do you install Python?
6. What is IDLE?
7. How do you write and run a Python program in VS Code?
8. What is the importance of indentation in Python?
9. What are variables in Python?
10. Name the basic data types in Python.
11. What is the difference between int and float?
12. How do you declare a string variable?
13. What is the bool data type used for?
14. How do you take user input in Python?
15. How do you display output in Python?
16. Write a program to take user input and display it.
17. Write a program to add two numbers.
18. Write a program to subtract two numbers.
19. Write a program to multiply two numbers.
20. Write a program to divide two numbers.
Week 2: Control Flow and Loops
Questions:
21. What is a conditional statement?
22. Write the syntax for an if statement.
23. What is the purpose of elif?
24. What are logical operators?
25. Write the syntax for a for loop.
26. What is the purpose of the while loop?
27. What does the break statement do?
28. What does the continue statement do?
29. Write a program to check if a number is even or odd.
30. Write a program to find the largest of three numbers.
31. Write a program to print numbers from 1 to 10 using a for loop.
32. Write a program to print numbers from 1 to 10 using a while loop.
33. Write a program to create a number guessing game.
34. Write a program to print a pyramid pattern using loops.
35. Write a program to print a square pattern using loops.
36. What is the output of print(5 > 3 and 2 < 4)?
37. What is the output of print(not True)?
38. What is the output of print(5 > 3 or 2 > 4)?
39. Write a program to print the multiplication table of a number.
40. Write a program to find the sum of all numbers in a list.
Week 3: Data Structures
Questions:
41. What is a list in Python?
42. How do you create a list?
43. How do you access the first element of a list?
44. What is list slicing?
45. How do you add an element to the end of a list?
46. How do you remove an element from a list?
47. What is the difference between append() and extend()?
48. What is a tuple?
49. How do you create a tuple?
50. Why are tuples called immutable?
51. What is a dictionary?
52. How do you create a dictionary?
53. How do you access a value in a dictionary?
54. How do you add a new key-value pair to a dictionary?
55. How do you remove a key-value pair from a dictionary?
56. What is a set?
57. How do you create a set?
58. How do you add an element to a set?
59. How do you remove an element from a set?
60. What is the difference between a list and a set?
Week 4: Functions and Modules
Questions:
61. What is a function in Python?
62. How do you define a function?
63. What are function arguments?
64. What is a return value?
65. What is a lambda function?
66. How do you import a module?
67. Name three built-in modules in Python.
68. How do you create your own module?
69. Write a function to calculate the factorial of a number.
70. Write a function to check if a number is prime.
71. Write a function to reverse a string.
72. Write a lambda function to square a number.
73. Write a program to generate a random number.
74. Write a program to shuffle a list.
75. Write a program to calculate the square root of a number.
76. Write a program to calculate the area of a circle.
77. Write a program to calculate the sum of two numbers using a function.
78. Write a program to find the maximum of three numbers using a function.
79. Write a program to remove duplicates from a list using sets.
80. Write a program to store student grades in a dictionary and retrieve them.