Worksheet
1. What is the purpose of the print command in Python?
a. To save the program
b. To display text on the screen
c. To exit the program
d. To debug errors
2. What are Strings in Python?
a. Numeric values like 4 or 4.5
b. A set of characters enclosed in inverted commas
c. Boolean values
d. Data types used for indexing
3. Which of these is a valid variable assignment in Python?
a. x = 6
b. 10 = x
c. x == 10
d. int x = 10
4. What is the key difference between rule-based systems and machine learning?
a. Rule-based systems are dynamic, while ML uses fixed rules
b. ML uses historical data, while rule-based systems follow strict rules
c. Rule-based systems use history, while ML uses trial and error
d. ML can only be used in government applications
5. How does machine learning help in financial services?
a. By automating tax calculation
b. By finding patterns in financial data and preventing fraud
c. By improving user interfaces
d. By managing government records
6. What is an escape character in Python?
a. A symbol used to escape a loop
b. A special character used to include special instructions in strings
c. A syntax to bypass errors
d. A comment indicator
7. Which industry uses ML to prevent financial fraud?
a. Marketing
b. Financial services
c. Government
d. Transportation
8. What is an example of machine learning in marketing?
a. Creating advertisements
b. Managing transportation logistics
c. Analyzing purchase history
d. Implementing government policies
9. print("I am learning\nPython")
a. I am learning\nPython
b. I am learning Python
c. I am learning
Python
d. Error
10. What is the output for the following code?
print(“4+5’)
a. 4+5
b. 9
c. Error
d. None of the above