Menu

Casting - Code Quiz

1. The user enters 15. What is printed?

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

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

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

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic