Search the Community
Showing results for tags 'python course'.
-
I started following the beginners Python Course recently, and today I entered the code as you shown in the video, only the star that Python creates has no white spaces. I was wondering if there was something that I was doing wrong. I've included a screen shot of it. --- import turtle t = turtle.Pen() t.color('blue','green') t.begin_fill() count = 0 #draw a star for x in range(1,9): t.forward(300) t.left(225) cunt = count+1 print("Count is: " + str(count)) #stop drawing after 8 loops if count > 7 and count < 9: #if count > 7: print("The star pattern is complete!") #break t.end_fill() print("A star is born!")
-
Hello, I'm following video, and for some reason IF statement doesn't work properly: def flow_control(): answer = input("Do you want to learn about multiline text strings? (yes or no)") #if answer == "yes" or answer == "y": if answer == ("yes" or "y"): display_lesson() else: use_time() print("End program") Commented out IF statement works perfectly well, but 2nd one work only for "yes". How can i make it work?