15 questions • Select the best answer for each question
What does this code print? text = "I love Java" print(text.replace("Java", "Python"))
What is the output? text = "apple,banana,orange" print(text.split(","))
What does split() return?
What will this code do? age = 25 print("Age is " + age)
Which line correctly combines text and a number?
Which is the best modern way to format strings?
What will this print? name = "Alex" print(f"Hello {name}")
What is the output? price = 12.567 print(f"{price:.1f}")
What does \n do in a string?
What will this print? print("Hello\nWorld")
What does \t represent?
What will this output? print("Path: C:\\Users\\Admin")
What does \r do?
Which feature is commonly used for live progress updates?
Which statement is TRUE about f-strings?