Menu

Casting - Code Quiz

1. The user enters 15. What is printed?

age = input('Enter your age: ') age = int(age) print(age + 1)
151
16.0
16
15

2. What is the value of total after the code runs?

price = '2.5' price = float(price) total = price * 4
2.52.52.52.5
10.0
10
8.0

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic