Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Show information 'bout Python [Mu: Python 3]
- # Copyright 2021-2023 Roland Richter
- # Print the text to the console
- print("Hello world!")
- # QUIZ Each of the next lines is incorrect; do you see why?
- # TRY Delete one '#' character, and see what happens:
- # pirnt("Hello world!")
- # print("Hello world!"
- # print("Hello world!)
- # print("Hello world!"))
- # print("Hello wolrd!")
- # HINT To check your code for mistakes, press the "Check" button;
- # often, it is also useful to clean up your code with "Tidy"
- # Some further facts about Python:
- name = "Guido van Rossum"
- year = 1991
- # `name` is a variable, and holds some text; `year` is also a variable,
- # and holds a number. print() can output both text and numbers.
- print("Python was invented in", year, "by", name, ".")
- # HINT You can use either "" or '' to enclose text in quotation marks
- # 🠗 🠗 🠗 🠗
- print('In 2021, Python was "Programming Language of the Year" of the TIOBE index')
- # HINT You can copy the snake emoji from https://old.unicode-table.com/en/1F40D/
- print("Python is often associated with the snake emoji", "🐍")
- # With +, you can not only add up numbers, but also concatenate text:
- flying_circus = "Monty Python"
- print("but the name is a tribute to the British comedy group " + flying_circus)
- print("The current version of the language is Python", 1+1+1)
- # ----------------------------------------------------------------------
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement