Q. Write a program using nested loops to produce rectangle of *’s with 6 rows and 20 *’s per row.
Answer :-
for i in range(6): for j in range(20): print("*",end=" ") print()
Output -
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
>>>
Accha is coding ka output kya h ???
ReplyDeleteOK. Please see post again.
DeleteThe output given is not correct so is the input correct?
ReplyDeleteCorrect output . You are wrong
DeleteQuestion says to make a rectangle not to outline it
ReplyDeleteYes filled rectangle
DeleteOk. I have filled the rectangle : )
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )