forked from a-newman/python-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1_introduction.py
More file actions
25 lines (23 loc) · 1008 Bytes
/
1_introduction.py
File metadata and controls
25 lines (23 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Welcome to Python! Let's get started learning how to code.
#
# ** Comments **
# The code you are reading right now is a comment. A comment is code that is
# written inside a program but that is not run by the computer. In Python, the
# most common way to write a comment is by putting a `#` at the front of a
# line. Anything after the `#` will not be run, so you can use them to leave
# notes!
#
# ** Print statements **
# A Python program communicates with you, the programmer, using something
# called a print statement. A print statement looks like this:
print("Hello, world!")
# The `print()` function tells Python what you want to output. The text inside
# the parentheses is displayed on the console when the program is run.
#
# Try running the program and make sure that you see "Hello, world!" in the
# output.
#
# ** Exercises **
# 1. Uncomment line 25. Add a message between the quotations and re-run the
# program. Make sure you see your message in the output!
# print("")