1.7 Lesson Practice answers

🧩 Syntax:
1.7 Lesson Practice answers

Q1:
Which of the following is NOT true about variables? 
A:
Variables can only store strings

Q2:
Assume the user types in 9 and 13. What is output by the following?
num1 = int(input("Enter a number: "))
num2 = int(input("Enter a number: "))
print(num1 + num2)
A:
22

Q3:
Which command can be used to convert variables into an integer?
A:
int()

Q4:
Which of the following is NOT true about strings?
A:
Strings can be used to perform arithmetic operations such as addition

Q5:
What is wrong with the following code?
num1 = int(input("Enter a number: "))
num2 = int(input("Enter a number: "))
print("The product is " + (num1 * num2))
A:
There should be a str() to convert the product to a string

Q6:
Which of the following lines of code correctly inputs the user's name?
A:
n = str(input("Enter: "))

thats all
ur welcome <3