Basics and Datatypes
Welcome to Week 1!
Week 1 Goal
In this week, you'll get up and running with Python. You'll learn what a program is and how to write and run programs that use Python's basic data types and operators.
Topics Covered
Here are some of the specific topics you'll learn in these lessons:
- Comments let us put text in a program that will be ignored by the program but are useful for humans reading the program. Comments in Python start with the
#
sign. - Variables are a way to store data with a name, so you can use it later. Creating a variable looks like
name = "Mo"
orage = 22
- Strings are the Python data type for text, and they look like
"hello world"
- Ints and Floats are the Python data types for numbers, and they look like
9
or0.7
- Python can use operators like
+
to add numbers or concatenate strings print
shows output to the user, andinput
asks the user to type in text- Strings can be concatenated (added together) using the
+
and usingf-strings
- You can format strings a variety of ways using f-strings