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
name = input("Say a name") | |
verb = input("Say a verb") | |
place = input("Say a place") | |
print(" " + name + " " + verb + " to " + place ) | |
""" | |
Say a name sam | |
Say a verb ran |
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("welcome to the Business keyword generator") | |
print("these are your options as we are still working on this website") | |
print("Consumer") | |
print("Trader") | |
print("Brand name") | |
print("Contract") | |
print("Consideration") | |
print("Implied conditions") | |
print("3Rs") | |
print("Gurantee or Warranty") |
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
<!DOCTYPE html> | |
<html> | |
<h1> Llamas and Alpaccas </h1> | |
<style> | |
.info { | |
color: red; | |
font-weight: bolder; | |
padding:20px; |
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
import random #This allows you to generate random numbers an data. | |
name = ["Jordan", "Sam", "James", "Cian"] #This is a list its like a bag filled with names | |
role = ["leader", "researcher", "secretary", "mechanic", "protector", "presantator"] #Also a list | |
for num in range(4): #A loop creating 4 jobs to be assigned. | |
who = random.choice(name) #Random.choice grabs a random item from the list name. | |
job = random.choice(role) #Random.choice grabs a random item from the listrole. | |
print(who + job) #Prints out the role assigned to the person. | |
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
class Monster: | |
health = 15 | |
def getScratch(self): | |
self.health = self.health - 2 | |
def sayHealth(self): | |
print("my health is" + str(self.health)) | |
def getThunder(self): |
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("This is my revison for python") | |
print("Theres a list of code that i will be using and telling you what it does") | |
sam = ["print", "sleep", "input", "while loop", "If else", "functions", "list", "for loop"] | |
print("sam") | |
while True: | |
choice=input("pick from the list") | |
if choice=="print": | |
print("The print() function prints the given object to the standard output device (screen) or to the text stream file.") |
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
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(23, GPIO.OUT) | |
GPIO.setup(24, GPIO.OUT) | |
GPIO.setup(17, GPIO.OUT) | |
GPIO.setup(27, GPIO.OUT) | |
GPIO.setup(11, GPIO.IN) | |
if i==1: |
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
while True: | |
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(23, GPIO.OUT). | |
GPIO.setup(24, GPIO.OUT). | |
GPIO.setup(17, GPIO.OUT). | |
GPIO.setup(27, 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
import RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(23, GPIO.OUT) | |
GPIO.setup(17, GPIO.OUT) | |
print("your motors are running ") | |
GPIO.output(23, GPIO.HIGH) | |
GPIO.output(17, GPIO.HIGH) |
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("welcome to my program to translate english to German") | |
print("these are your options") | |
possible_words = ["hello","goodbye", "my name is", "what is that", "ye", "good evening", "good night", "happy", "ok", "thank you", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] | |
print(possible_words) | |
while True: | |
choice=input("type english") | |
if choice=="hello": | |
print("noun/verb") | |
print("Guten tag") |
NewerOlder