132k views
12 votes
Write a paragraph in python to print 5 using a for loop

User Mitesh
by
3.3k points

1 Answer

2 votes

Answer:

For f in range(10):

if f == 5 :

print(f)

Step-by-step explanation:

The for loop initiates a range of value and f is used to evaluate each value in the range.

The if statement block checks and detect if the number in the range, f is 5 ; once it detect that f equals to 5, it prints the digit 5 using the print statement.

User Benjamin RD
by
3.4k points