# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Python Primer: The Basics
#
# This is a notebook file. It is an interactive document that you can edit on the fly, and you can use it to write and execute programs. You can learn more about the interface by reading the [online documentation](http://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Notebook%20Basics.html), although it should be pretty simple to understand what is going on without any documentation. 
#
# You can also click "Help : User Interface tour" from the menu, which will explain the basics of the notebook.

# ## Our first Python program
#
# Traditionally, every time that we start learning a new language, we start with a program that prints "Hello World" in the output.

print("Hello World")

# To run the "Hello World" program above, just select the code cell, and then click the "Run" button from the toolbar. Alternatively, you can also press Ctrl + Enter, if you prefer to use keyboard shortcuts. You can discover more keyboard shortcuts by selecting "Help : Keyboard Shortcuts" from the menu.

# ### Exercise
#
# Print your own message:

# +
# your code here
# -

# ## Comments
#
# You will have noticed in the cell above the line 
# `# your code here` 
#
# This is a _comment in the code_
#
# Comments are notes in your source code that aren't exectued when your code is run. These are useful for reminding yourself what your code does, and for notifying others to your intentions. 

# +
# A comment
#
# We use comments to write down things that we want to rememember
# or instructions for other users that will read/use our code

# Anything after the # is ignored by python.

print("I could have written code like this.")  # the comment after is ignored

# +
# You can also use a comment to "disable" or comment out a piece of code:
# print("This won't run.")

print("This will run.")
# -

# ### Exercise
#
# Fix the code below, so that it runs:

# +
# print("Hi Panos!''
# -

# ## Multiline comments 
#
# Python has single line and multiline comments. These multiline comments are also called _docstrings_ because they are often used to write documentation for the code. 

# +
# This is a single line comment
# This a second single line comment

print("trying out some comments")
"""This code is used to print 
a message of your choice. Notice that 
this message that is included in the triple double
quotes will not execute."""

print("python ftw")
# -

# ## Notebooks: Markdown for text
#
# In notebooks, you can simply double click on a piece of text and then edit it. To restore it back, from edit mode, press "Run". Markdown is a very simple language for formatting text, and you can read further instructions by going to "Help : Markdown" from the menu, or checking the [online examples](http://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Working%20With%20Markdown%20Cells.html)
#
# Below, we will see a few examples.

# # Big Header 
# ## Smaller Header
# ### A little smaller header
# #### Getting smaller and smaller
# ##### Very very small header
# ###### I do not even know if this is a header anymore

# You can write plain text, **bold text**, and _italics_. 
# You can also ~~strike~~ things that were incorrect.
#

# If you want to write code, you can use the backtick characters: `print("Hello World")`
#
# Or you can use triple backticks, and can get color coding by specifying the language that you use.
# ```python
# print("Hello World")
# ```
#
# ```html
# <html>
#     <body>Hello World!</body>
# </html>
# ```

# You can also create bulleted lists:
# * Learn Python
# * ...
# * Millions!

# Or perhaps you want to write ordered lists:
# 1. Learn Python
# 2. Learn SQL
# 3. ....
# 4. Millions!

StarcoderdataJupyterScriptsDedupFiltered