Advertisement
rric

bout_Python

Oct 9th, 2023 (edited)
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.12 KB | None | 0 0
  1. # Show information 'bout Python [Mu: Python 3]
  2. # Copyright 2021-2023 Roland Richter
  3.  
  4. # Print the text to the console
  5. print("Hello world!")
  6.  
  7. # QUIZ Each of the next lines is incorrect; do you see why?
  8. # TRY  Delete one '#' character, and see what happens:
  9. # pirnt("Hello world!")
  10. # print("Hello world!"
  11. # print("Hello world!)
  12. # print("Hello world!"))
  13. # print("Hello wolrd!")
  14.  
  15. # HINT To check your code for mistakes, press the "Check" button;
  16. #      often, it is also useful to clean up your code with "Tidy"
  17.  
  18. # Some further facts about Python:
  19. name = "Guido van Rossum"
  20. year = 1991
  21. # `name` is a variable, and holds some text; `year` is also a variable,
  22. # and holds a number. print() can output both text and numbers.
  23. print("Python was invented in", year, "by", name, ".")
  24.  
  25. # HINT You can use either "" or '' to enclose text in quotation marks
  26. #     🠗                    🠗                                🠗                   🠗
  27. print('In 2021, Python was "Programming Language of the Year" of the TIOBE index')
  28.  
  29. # HINT You can copy the snake emoji from https://old.unicode-table.com/en/1F40D/
  30. print("Python is often associated with the snake emoji", "🐍")
  31.  
  32. # With +, you can not only add up numbers, but also concatenate text:
  33. flying_circus = "Monty Python"
  34. print("but the name is a tribute to the British comedy group " + flying_circus)
  35. print("The current version of the language is Python", 1+1+1)
  36.  
  37.  
  38. # ----------------------------------------------------------------------
  39. # This program is free software: you can redistribute it and/or modify
  40. # it under the terms of the GNU General Public License as published by
  41. # the Free Software Foundation, either version 3 of the License, or
  42. # (at your option) any later version.
  43. #
  44. # This program is distributed in the hope that it will be useful,
  45. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  46. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  47. # GNU General Public License for more details.
  48. #
  49. # You should have received a copy of the GNU General Public License
  50. # along with this program.  If not, see <https://www.gnu.org/licenses/>.
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement