Skip to content

Instantly share code, notes, and snippets.

@toddmilne13
toddmilne13 / Pokemon.py
Created September 13, 2016 09:52
stjlol-tm-Pokemon battle simulator
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")
@toddmilne13
toddmilne13 / it works!!!
Created September 22, 2016 14:37
stjlol-tm-PhScale
#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:
@toddmilne13
toddmilne13 / stjlol-tm-PokemonListsProject
Created September 28, 2016 11:48
Pokemon lists project
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)
@toddmilne13
toddmilne13 / stjlol-tm-Functionsproject
Created September 28, 2016 15:55
Functions project
#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")
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:
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=
@toddmilne13
toddmilne13 / Rovercode.py
Last active January 17, 2017 10:31
STJLOL-TM-Code
#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
@toddmilne13
toddmilne13 / NavBar.html
Created October 20, 2017 11:56
NavBar.html
//CSS//
#nav {
right: 10px;
height: 70px;
background-color: rgb(242, 242, 242);
opacity: 0.6;
width: 100%;
text-align: center;
@toddmilne13
toddmilne13 / yol0.py
Created January 17, 2018 10:39
rememberingpyhton.py
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")
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 ")