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
choice = input("Choose your attack: orange or finger") | |
if choice == "orange": | |
print("you hit the first monstwr with a orange") | |
monster1.getsHit() | |
elif choice == "finger": |
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("anything") #this prints it out | |
from time import sleep #this makes the programme pause | |
sleep(24) | |
my dog = input("daisy is my dog") #this is an input | |
while True: #while loop | |
print("doggos") |
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
#Only in PYTHON2.7 | |
import RPi.GPIO as GPIO #GPIO Libraries | |
from time import sleep #Sleep Functions | |
import readchar #keyboards | |
GPIO.setwarnings(False)#Blocks error warnings | |
GPIO.setmode(GPIO.BCM) #Setting Up | |
GPIO.setup(23, GPIO.OUT) #back right | |
GPIO.setup(24, GPIO.OUT) #front right |
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
# coding: utf-8 | |
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode (GPIO.BOARD) | |
GPIO.setmode(17, GPIO.OUT) | |
GPIO.setup(19, GPIO.OUT) | |
GPIO.setup(22,GPIO.OUT) | |
GPIO.setup(26,GPIO.OUT) |
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 | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(23,GPIO.OUT) | |
GPIO.output(23,GPIO.HIGH) | |
sleep(5) | |
GPIO.output(23,GPIO.LOW) | |
GPIO.(cleanup) |