Problemas
What will this code output? fori in range(3): print("Python") A) Python Python Python Python Python (repeated 3 times on separate lines) An error
Roztwór
Gerardo
élite · Tutor durante 8 años
4.2
(293 Votos)
Respuesta
'Python (repeated 3 times on separate lines)'
Explicación
## Step 1The given code is a simple Python script that uses a for loop to iterate over a range of numbers. The range is set to 3, which means the loop will run three times.## Step 2The print statement inside the loop is "Python". This statement is executed each time the loop runs.## Step 3Since the loop runs three times, the print statement "Python" will be executed three times, each time on a new line.