Menu

Constants - Code Quiz

1. What is printed?

VAT = 0.2 cost = 50 total = cost + cost * VAT print(total)
10.0
50.2
60.0
60

2. Which line declares a constant?

MAX_LIVES = 3 lives = MAX_LIVES lives = lives - 1 print(lives)
lives = lives - 1
lives = MAX_LIVES
print(lives)
MAX_LIVES = 3

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic