This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
print("Welcome to the Pokemon Battle Simulator") | |
sleep(2) | |
pokeball=input("A wild Dragonite has apeared!!") | |
print("First choose what Pokeball you would like to youse") | |
print("The options are Poke ball, Great ball and Ultra ball") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this is my code | |
print("Give me a number between 0-14 and ill tell you if its an acid or base") | |
answer=int(input("Giv me and number")) | |
if answer >= 7: | |
print("This number is a base") | |
elif answer <= 6: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bag = ( 'pokeball' , "pokedex" , 'potion' ) | |
print("Welcome to Todds pokemon shop!!") | |
print("Lets have a look inside your bag!") | |
print ("This may take a while") | |
print (bag) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#here is a word changer thingamaboba lol | |
def adoodle(word): | |
print(word+"???") | |
print("more like...") | |
thingy = word+"adoodle" | |
thingy = thingy.upper() | |
print(thingy) | |
print("look at the cool word i just made " + word.upper() +"doodle") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("look what i can do") | |
ans = "Oranges" + "Apples" | |
ans=input("What do you get if you add Oranges and Apples... ") | |
if ans == "OrangeApples": | |
print("Well done you got it right") | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def compute_percentage(): print("Example...Tell me the 30% of 100 ") x = input("Give me the number: ") number=int(x) y = input("Give me the percentage to compute(insert only the number without %): ") percentage = int(y) result = (number * percentage)/100 print("{0}% of {1} is: {2}".format(percentage,number,result)) print("\n") def find_percentage(): print("Example... x of y what does represent in percentage ?") first = input("Give me x: ") x=int(first) second = input("Give me y: ") y = int(second) result = (x*100)/y print("{0}% of {1} represents the {2}%".format(x,y,result)) print("\n") print("This is a small program that you can use to compute and find the percentage of a number...")y=2while(y!=0): x = input("Insert 1 to compute a percentage\n" "Insert 2 to find the percentage\n" "Insert 0 to exit\n") choice = int(x) if (choice==1): compute_percentage() elif (choice==2): find_percentage() elif (choice= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#code to make rover move forward | |
#the setup | |
import RPi.GPIO as GPIO # importing the raspberry as GPIO | |
from time import sleep #importing sleep to the program | |
GPIO.setmode(GPIO.BCM) #setting mode to BCM | |
GPIO.setup(23, GPIO.OUT) #setting up left motor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
bag = ["yuppa", "giggle", "ha", "lol"] | |
for item in bag: | |
if item == "yuppa": | |
print("Hey I found a yuppa!!!!!!") | |
def namegame(): #name game function | |
while True: | |
name = input("Try guess my name, bet you wont do it fam") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
while True: | |
print("Welcome to my code on some song suggestions") | |
choice=input("what mood are you in, Happy, Sad or any other mood") | |
if choice=="happy": | |
print("Maybe listen to some pop music or electric music") | |
sleep(1) | |
print("Try this song.. https://www.youtube.com/watch?v=ZbZSe6N_BXs ") |
OlderNewer