Home > other > Introduction to the small white consult
Introduction to the small white consult
Time:09-23
I want to know what python is hexagonal drawn using a while loop and a for loop, how to achieve my own code has been a mistake, can't find the wrong place to correct, be badly in need of help
CodePudding user response:
[code=python]
The import turtle as t Def the main () : The count=1 While count<=6: T.f orward (100) T.l eft (60) Count +=1 T.e xitonclick () If __name__=="__main__ ': The main () -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- The import turtle as t Def the main () : For I in range (6) : T.f orward (100) T.l eft (60) T.e xitonclick () If __name__=="__main__ ': The main () [/code]