Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 1 - Introduction to Computers, Programs, and Python - Programming Exercises - Page 27: 1.2


The answer is: for i in range(5): print("Welcome to Python")

Work Step by Step

First, you want the program to repeat the answer 5 times, so therefore you need a loop function; this is the range. You tell the loop to repeat what is inside it 5 times (which in this case is a print() function). It will display what is inside the print() 5 times.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.