Skip to content

Instantly share code, notes, and snippets.

View michaeltennant4554's full-sized avatar

TheLegend27 michaeltennant4554

  • Your nearest @Tesco
  • Under your bed
View GitHub Profile
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
p {
text-align: center;
font-size: 60px;
margin-top:0px;
}
class dog:
health = 50
def getSlashed(self)
self.health = self.health - 8
def sayHealth(self):
print("my health is " + str(self.health))
<html>
<head>
<meta charset="utf-8">
<title>Challenge: Links you love</title>
</head>
<body>
<h1>Links I love</h1>
<p>Check out my Favorite websites!</p>
print ("hi welcome to music suggester to pick what genre you want just type genre")
choice=input
def genre():
print("hip hop,jazz,rnb,pop,party
if choice == ("rap"):
print("https://m.youtube.com/watch?v=anI5b2PEmdA")
elif choice == ("bike"):
print ("i can cycle that")
else choice == ("")
import subprocess
import smtplib
import socket
from email.mime.text import MIMEText
import datetime
#account info
to = 'RPiTime@gmail.com'
gmail_user = 'RPiTime@gmail.com'
gmail_password = '12345616'
smtpserver = smtplib.SMTP('smtp.gmail.com', 587)
import RPi.GPIO as GPIO #this puts the GPIO in the program always has to be first.
sleep (5) #this stops the pi from doing something straight away and makes it wait.
GPIO.setmode(GPIO.BCM) #sets the mide of the pi to Bcm this is always the second.
GPIO.setup(17,GPIO.OUT) #TELLS THE pi that u what number on the GPIO you will be useing.
GPIO.setup(23,GPIO.OUT
bag = ["chicken" , "Tom hanks" , "christmas cake"]
for item in bag: #this will make a item go each time
print(item) #this will make the item print on the list
#now heres a more advanced loop :8
bag = ["chicken" , "Tom hanks" , "christmas cake"]
for item in bag: #starts to look through the bag for the item u want
def joke():
print("why the chicken cross the road")
print("casue it wanted to")
joke()
print("well the game is mainly about sailing around to think that you found America")
print("Their will be loads of dangerous stuff ahead")
Print("Like scurvy and Storms and hostile natives")
print("Alright you journey begins begging the king and queen to fund your journey")
print("Please Señor I need you fund this journey so I can prove that the world is round")