-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasics of Python.py
25 lines (23 loc) · 1.43 KB
/
Basics of Python.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
code = 1285638596
print("Hi! Let me introduce myself. I'm Ryan the Coder.")
print("I am new to coding and have recently started Python!")
print("Let me help to walk you through the basics of Python."'\n')
print("First, of course, the print() function allows you to print text on the screen, and i'm acually using it right now!")
print("It allows you to talk to the player.")
print("It also allows you to make a story or a Python book."'\n')
print("Next, is the input() feature")
print("It allows you to ask someone their age, or name.")
print("The input gets sent and is stored temporarily in the Python file."'\n')
print("Finally, we have if. It goes well with input()")
print("If is basically a This or That.")
print("If the text specified is entered correct, something will happen.")
print("You put else under what you want to happen if the text is correct, and it will do the code under else otherwise."'\n')
response = input("Please enter the secret code in the discription for one more command. ")
if response == '1285638596':
print("Congrats! You found it!")
print("Here is the extra command:"'\n')
print("Finally for real, we have the new line command. It can only be used with print.")
print("After the quotation mark, put an apostraphe and put in backslash n then another apostraphe.")
print("I hope this helps.")
else:
print("Oops, you got it wrong. Please exit and reopen this file to try again.")