In: Computer Science
Fill in the blanks of this code to print out the numbers 1 through 7.
number = 1
while number ___ 7:
print(number, end=" ")
___
number=1
while number <= 7:
print(number,end=" ")
number=number+1
Explanation:-
In above code underlined part is fill in the blank parts.
Here , we are using while loop to print number from 1 to 7 with spaces between them.
First blank is in condition part of while ,we used <= .This makes loop iterate 7 times.
In next blank , we are incrementing number by 1 .
if you want upto 6b then we can use < instead of <=.