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
Which of the following programs prints the number 2, and nothing else, to the console when it runs?
text = "library" for i in range (len(text)): print(text)
text = "library" for i in range (len(text)): print(i)
text = "library" x = text.find("r") print(x)
text = "library" x = text.find("b") print(x)