Skip to content

Instantly share code, notes, and snippets.

View ethanshine1234's full-sized avatar

Ethan ethanshine1234

View GitHub Profile
@ethanshine1234
ethanshine1234 / roverhomework.py
Last active March 12, 2017 18:46
STJLOL-ES-homework
"""
This program is supposed to be able to allow you to choose if
you want to manualy control it or let it control itself.
I hope that this program will blow your mind.
"""
import RPi.GPIO as GPIO
from time import sleep
import RPi.GPIO as GPIO
import time
def auto():
GPIO.setmode(BCM)
GPIO.setup(11, GPIO.IN)
GPIO.setup(3, GPIO.OUT)
while True:
i=GPIO.input(11)
@ethanshine1234
ethanshine1234 / rover.py
Created January 12, 2017 07:52
STJLOL-ES-rover code
"""
this is only some of the code. Another one is already saved onto our pi
"""
import RPi.GPIO as GPIO
from time import sleep
while True:
GPIO.setmode(BCM)
GPIO.setup("""*""", GPIO.OUT)
@ethanshine1234
ethanshine1234 / ph.py
Last active June 1, 2017 07:56
STJLOL-ES-UNIT 3
"""
my original idea
print("Type a number between 1 and 10")
print("Ttpe easteregg, I dare you")
ph=input("")
if ph == "7": #fail
print("That is neutral")
sleep(1)
@ethanshine1234
ethanshine1234 / open.py
Last active October 25, 2016 09:46
STJLOL-ES-open project
from time import sleep
lesso = ['lesson 1', 'lesson 2', 'lesson 3', 'lesson 4', 'lesson 5', 'lesson 6', 'end task']
def lesson1():
print("Here you will learn the basics")
sleep(1)
print("print will allow the computer to say stuff")
sleep(1)
print("Here is an example: print(\"Hello\")")
@ethanshine1234
ethanshine1234 / list.py
Last active October 5, 2016 07:55
STJLOL-ES-list
from time import sleep #forget this and it will go 'error error error'
def add(lick):
print("I like that too") #it took me ages to figure this out
sleep(1)
pie = lick+"inator"
print(pie)
sleep(1)
print("or how about.....") #here is the funtion
print(lick+"azoid")
@ethanshine1234
ethanshine1234 / game.py
Last active October 5, 2016 07:54
STJLOL-ES-game
#you are invinceble
from time import sleep
terminate= ['human', 'terminator', 'human', 'human', 'terminator', 'terminator', 'human', 'terminator', 'spaceship', 'human', 'chopper', 'terminator', 'human', 'terminator', 'terminator', 'terminator', 'chopper' 'teminator', 'human', 'human', 'spaceship']
print(terminate)
@ethanshine1234
ethanshine1234 / pokemon2.py
Last active October 5, 2016 07:53
STJLOL-ES-pokemon
"""
it works I just don't know how to stop the program from resetting the health back to 10
"""
from time import sleep
import random
@ethanshine1234
ethanshine1234 / unit4.py
Last active October 4, 2016 09:36
stjlol-ES-homework
from time import sleep
def awesome(add):
pie = add+" is AWESOME!!!!!" #it only makes grammatical sense sometimes
print(pie)
while True:
awesome(input("Type something random.. "))
sleep(1)
@ethanshine1234
ethanshine1234 / strings.py
Last active October 5, 2016 07:55
stjlol-ES-strings
from time import sleep
import random
health=10
print(health)
damage=random.random()
damage=10*damage
print(int(damage))
sleep(1)
health = health - damage