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?
def print_three_colors(col1, col2, col3 = "yellow"): print("First color: " + col1) print("Second color: " + col2) print("Third color: " + col3) print_three_colors("green", "blue", "purple")
First color: col1 Second color: col2 Third color: col3
First color: green Second color: blue Third color: purple, yellow
First color: green Second color: blue Third color: purple
First color: green Second color: blue Third color: yellow