Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
Homework exercise
# python 3.5.2 # https://1drv.ms/f/s!ArsHV2FdZgQ1iQOclKKq2kqbxLdg # Homework exercise - Use for/while loops for completing the following design # * 3 blanks, 1 star # *** 2 blanks, 3 star # ***** 1 blanks, 5 star # ******* 0 blanks, 7 star # *** 2 blanks, 3 star # ***** 1 blanks, 5 star # ******* 0 blanks, 7 star # ||| 3 blanks, 3 line # ||| 3 blanks, 3 line i=0 for i in range(9): if i<=4: print(i, ' '*(4-i) + '*'*(i*2-1)) if 5<=i<=7: print(i, ' '*(7-i) + '*'*((i-5)*2+3)) if i>=8: print(i, ' '*2 + '|'*3) #........................................... i=0 while i<9: i=i+1 if i<=4: print(i, ' '*(4-i) + '*'*(i*2-1)) if 5<=i<=7: print(i, ' '*(7-i) + '*'*((i-5)*2+3)) if i>=8: print(i, ' '*2 + '|'*3)
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Q5
recreation of https://js.do/samples/labyrinth in python. Works in the same way.
inverse matrix gauss jordan
Add missing names
H.W.5 ALL Solutions
Rectangle Perimiter
WORD THING
fb_series
lesson3 part3
filtering python3
Please log in to post a comment.