Advertisement
PastebinNexus

Very basic example

Dec 23rd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. #Very basic code example
  2. print("Hello world!")
  3. print("The print function displays text!")
  4. print("Crikey!")
  5. x=input("This will let you type and the input will be saved under a variable called X!")
  6. print("You can even print variables like this:")
  7. print(x)
  8. print("Horray!")
  9. print("You can branch off code using 'if'")
  10. if x==x:
  11.     print("This will always print because X is X")
  12. elif x!=x:
  13.     print("This will only print if X isnt equal to X")
  14. print("Elif is a combination of else and if, it allows you to make more then 1 branch")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement