Which statement correctly saves the number of items in the v

Which statement correctly saves the number of items in the variable quantity?

A) quantity = float(userInput)
B) quantity = userInput
C) quantity = int(userInput)
D) quantity = int[userInput]

Solution

Answer: quantity = int(userInput) this statement saves the number of items in the variable quantity.

userInput = input(\"Please enter the quantity:\")

quantity = int(userInput)

Which statement correctly saves the number of items in the variable quantity? A) quantity = float(userInput) B) quantity = userInput C) quantity = int(userInput

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site