We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Introduction
- Python If-Else
- Discussions
Python If-Else
Python If-Else
Sort by
recency
|
4350 Discussions
|
Please Login in order to post a comment
"n=int(input()) if n%2==0: if 2<=n<=5: print("Not Weird") elif 6<=n<=20: print("Weird") else: print("Not Weird")".enjoy guys
else: print("Weird")
else: statement at the END is very important!! Thank you guys we are learning.
guys this is not the code but a turtle module code from python could someone run it. MY CODE:
import turtle import random for _ in range(1000000000): color_list_ask = ["red", "yellow", "green", "blue", "orange", "purple"] ask = input("Pick a one color then when you are done it will repeat until you have enough colors type 'break' when you have finished not after you write your colors this process will repeat 1,000,000,000 times") if ask not in color_list_ask: print("not in color list please pick the colors from the rainbow") if ask == "break": print("Starting project") t = turtle.Turtle() t.penup() t.backwards(180) t.pendown() cnc = 100000000 for _ in range(cnc): poop = random.choice(ask) t.pencolor(poop) diahrea = [10, 10000] diahrea_mixer = random.randint(diahrea) t.circle(diahrea_mixer) turtle.done() print("done")