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")
First color: green Second color: blue
First color: green Second color: blue Third color: NaN
First color: green Second color: blue Third color: col3
First color: green Second color: blue Third color: yellow