Skip to content

Instantly share code, notes, and snippets.

@ethanshine1234
Last active October 25, 2016 09:46
Show Gist options
  • Save ethanshine1234/9ef2c1e364a8cbf832a14eb57f500d0b to your computer and use it in GitHub Desktop.
Save ethanshine1234/9ef2c1e364a8cbf832a14eb57f500d0b to your computer and use it in GitHub Desktop.
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\")")
sleep(1)
print("Try it yourself. Copy my example")
pri=input("")
if pri == "print(\"Hello\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson2()
elif pri == "print(\"hello\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson2()
else:
print("Make sure you add 'print' and check your spelling")
sleep(1)
print("Try again")
pri2=input("")
if pri2 == "print(\"Hello\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson2()
elif pri2 == "print(\"hello\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson2()
else:
print("Program terminated. Restart")
def lesson2():
print("Here you will learn how to use input")
sleep(1)
print("This will allow you to type stuff into the computer")
sleep(1)
print("Here is an example: pie=input(\"How are you?\")")
sleep(1)
print("Try it yourself. Copy my example")
inp=input("")
if inp == "pie=input(\"How are you?\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson3()
elif inp == "pie=input(\how are you?\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson3()
else:
print("Make sure you add '=' or 'input' and check your spelling")
sleep(1)
print("Try again")
inp2=input("")
if inp2 == "pie=input(\"How are you?\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson3()
elif inp2 == "pie=input(\"how are you?\")":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson3()
else:
print("Program terminated. Restart")
def lesson3():
print("Now we move onto more advanced stuff")
sleep(1)
print("We will use 'if', 'elif' and 'else'")
sleep(1)
print("They are used like this: if something happens, do this")
sleep(1)
print("here is an example: if cheese == \"yes\":")
print("Try it yourself. Copy my example")
eli=input("")
if eli == "if cheese == \"yes\":":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson4()
elif eli == "if cheese == \"yes\":":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson4()
else:
print("Make sure you add 'if' or '==' or ':' and check your spelling")
sleep(1)
print("Try again")
eli2=input("")
if eli2 == "if cheese == \"yes\":":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson4()
elif eli2 == "if cheese == \"yes\":":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson4()
else:
print("Program terminated. Restart")
def lesson4():
print("Now we move onto 'funtions'")
sleep(1)
print("They make your code a lot shorter and easier to understand")
sleep(1)
print("Once you make a 'funtion' you can use it where ever you want")
sleep(1)
print("Here is an example: def pink():")
sleep(1)
print("Try it yourself. Copy mine")
fun=input("")
if fun == "def pink():":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson5()
elif fun == "def pink():":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson5()
else:
print("Make sure you add 'def' or '()' or ':' and check your spelling")
sleep(1)
print("Try again")
fun2=input("")
if fun2 == "def pink():":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson5()
elif fun2 == "def pink():":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson5()
else:
print("Program terminated. Restart")
def lesson5():
print("This time you will learn about lists")
print("'lists' will make a list and then you can print it")
print("here is an example: food = ['pizza', 'chips', 'pasta', 'icecream']")
print("Try it yourself. Copy my example")
lss=input("")
if lss == "food = ['pizza', 'chips', 'pasta', 'icecream']":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson6()
elif lss == "food = ['pizza', 'chips', 'pasta', 'icecream']":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson6()
else:
print("Make sure you add '=' or '[]' or ':' and check your spelling")
sleep(1)
print("Try again")
lis2=input("")
if lis2 == "food = ['pizza', 'chips', 'pasta', 'icecream']":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson6()
elif lis2 == "food = ['pizza', 'chips', 'pasta', 'icecream']":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
lesson6()
else:
print("Program terminated. Restart")
def lesson6():
print("Here you will learn about For Loops")
sleep(1)
print("They will identify things in a list and do stuff to them")
sleep(1)
print("They use a combination of lists, which we learned about in lesson 5, and 'if', 'elif' and 'else', see lesson 3")
sleep(1)
print("If you have not learned about them, then you should restart and do those lessons")
sleep(1)
print("Here is an example: food = ['pizza', 'chips', 'pasta', 'icecream']")
print(" for item in food")
print(" if item == \"pasta\":")
print(" print(\"yum\")")
print("Just type the the second line")
loo=input("")
if loo == "for item in food":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
endtask()
elif loo == "for item in food":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
endtask()
else:
print("Make sure you add 'for' or 'in' or 'item' and check your spelling")
sleep(1)
print("Try again")
loo2=input("")
if loo2 == "for item in food":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
endtask()
elif loo2 == "for item in food":
print("Great job " + name + "!!!")
sleep(1)
print("Let's move on!")
sleep(1)
endtask()
else:
print("Program terminated. Restart")
def endtask():
print("You have finnished the tutorial")
sleep(1)
print("Now you have a task to complete")
sleep(1)
print("Create a github account")
sleep(1)
print("You must create a program that uses all the things I have taught you")
sleep(1)
print("Upload the program to github as a new gist")
sleep(1)
print("Make sure in the description to add 'STJLOL'")
sleep(1)
print("Well done " + name + "!!")
sleep(1)
print("program terminated")
print("Welcome user.")
sleep(1)
name=input("What is your name?")
sleep(1)
print("Hello " + name)
sleep(1)
print(lesso)
sleep(1)
print("Which lesson do you want?")
less=input("")
if less == "lesson 1":
print("Then lets get started!")
sleep(1)
lesson1()
elif less == "lesson 2":
print("Then lets get started!")
sleep(1)
lesson2()
elif less == "lesson 3":
print("Then lets get started!")
sleep(1)
lesson3()
elif less == "lesson 4":
print("Then lets get started!")
sleep(1)
lesson4()
elif less == "lesson 5":
print("Then lets get started!")
sleep(1)
lesson5()
elif less == "lesson 6":
print("Then lets get started!")
sleep(1)
lesson6()
elif less == "end task":
print("Let's go!!")
sleep(1)
endtask()
else:
print("Please restart")
#This the output for the first lesson
"""
Here you will learn the basics
print will allow the computer to say stuff
Here is an example: print("Hello")
Try it yourself. Copy my example
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment