Skip to content

Instantly share code, notes, and snippets.

@dobrienSTJ
Created September 14, 2016 17:04
Show Gist options
  • Save dobrienSTJ/09fbb02ca5a255bcd4858824f231e608 to your computer and use it in GitHub Desktop.
Save dobrienSTJ/09fbb02ca5a255bcd4858824f231e608 to your computer and use it in GitHub Desktop.
STJLOL-DOB-CodingTutorial
from time import sleep
while True:
def bug():
print("If you have not picked to learn about 'the topic' you have found a BUG.The fix is currently being developed. Sorry for any inconvience cause. Visit www.tinyurl.com/codingtime for a full guide on coding or visit the 'dcuish' YouTube channel for video tutorials.")
print("Welcome to the Coding Class Help Center!!!!")
sleep(2)
tutorial=input("Now pick a topic to learn about!!! Topics: print, string, multiplying strings, saving python files, opening saved python files in the terminal, editing python files in the terminal, make the computer pause, create a loop, how to use if, elif and else, make a function")
if tutorial == "print":
print("When printing use the print("") command Example: print Hello World ")
elif tutorial == "string":
print("To make a string or variable of something just use the command = " " Example: thingy = lol ")
elif tutorial == "multiplying strings":
print("When multiplying variables just use the * sign Example: thingy*100 ")
elif tutorial == "saving python files":
print("To save a python file clik FILE in the top left corner of the shell and then click SAVE AS and save the file Example: Save As example.py ")
elif tutorial == "opening saved python files in the terminal":
print("To open a saved python file in the terminal type ls then chmod +x name_of_your_file.py and the sudo python3 name_of_your_file.py ")
elif tutorial == "editing python files in the terminal ":
print("To easily edit your python code inside the terminal type pico name_of_your_file.py and to save ctrl+x and y then press enter to get back to the terminal")
elif tutorial == "make the computer pause":
print("to use the sleep function at the top of your code type from time import sleep and then put sleep into your code below Example: sleep(3) ")
elif tutorial == "create a loop":
print("To create a loop in your code just type while True: at the top of your code")
elif tutorial == "how to use if, elif and else":
print("using if, elif and else is probably the hardest of these tutorials, there is so much to code in and if,elif and else that you should just check out the coding slides for the best explanation. For more info check out page 81-83 in the Coding Time Slides")
elif tutorial == "make a function":
print("To create a function in your code just type def and the name of your function and a double bracket and colon at the top of your code and add a piece of text or anything you want underneath")
else:
print("This topic is not avaible yet in this version of the python learning center, please contact Daniel to request a topic")
sleep(2)
print(" Thanks for using the Python learning Center in Python!!!!!")
sleep(2)
print("Updated regularlly!!!!!")
sleep(2)
print(" For more info check out www.tinyurl.com/codingtime or the 'dcuish' YouTube Channel for video Tutorials.....")
sleep(2)
print(".....And you will soon be a.....")
sleep(1)
print(">>>>>CODING MASTER<<<<<<<<")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment