Facebook
From Nero, 7 Months ago, written in Python.
Embed
Download Paste or View Raw
Hits: 398
  1. # print
  2.  
  3. print("hello")
  4.  
  5. print("hello" + " world," + " nhow are you!")
  6.  
  7. # variables
  8.  
  9. #int variables
  10. x = 5
  11. y = 7
  12. burrito = 123
  13.  
  14. #floating point variables
  15. a = 3.4
  16. b = 7.8973
  17. taco = 8.274
  18.  
  19. #String variables
  20. name = "Phillip"
  21. coding_language = "python"
  22. data_of_today = "9-16-23, September 16th, 2023"
  23. #NOTE: "9" is NOT equal to 9. The computer views them differntly
  24.  
  25. #FUNCTIONS
  26.  
  27. def say_hello_to_phillip():
  28.   print("Hello, Phillip!")
  29.  
  30. say_hello_to_phillip() # when you build a function
  31. #you MUST call the function (by writing its name)
  32. #in order for it to run
  33.  
  34. def say_hello_to_name(name):
  35.   print("Hello, " + name + "!")
  36.  
  37. say_hello_to_name("Ryden")
  38.