Menu

Local and Global Variables - Code Quiz

1. What is printed when this program runs?

def addVAT(price): newPrice = price * 1.2 return newPrice print(addVAT(10))
10
10.2
12.0
12

2. What happens when this program runs?

def double(n): result = n * 2 return result double(4) print(result)
It prints 0
It prints 8
It prints 4
It stops with an error

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic