Explore what CodeHS has to offer for districts, schools, and teachers.
Click on one of our programs below to get started coding in the sandbox!
View All
What would be the output of the following program?
x = 10 y = 5 def multiply(): product = x * y print("Product: " + str(product)) multiply()
Nothing would print to the console because the function multiply is declared but not called.
multiply
There would be an error because the function multiply cannot access the variables x and y.
x
y
Product: 50
Product: 105