Answer:
Which line of code outputs the decimal portion of a float stored in the variable x?
print (x - int(x))
Three of the following values could be stored as strings. When would you NOT use a string command?
To store decimal values.
Consider the following code:
x = int(input("Enter a number: "))
print (x)
What happens if the user types in A?
This would cause an error: an integer variable cannot store a string.
Which of the following is NOT a data type in Python?
decimal
Which of the following numbers might this code generate: random.randint(1,9)?
1