code FILENAME.py
to open (/create) a file in the editor, or
python FILENAME.py
to run the Python interpreter on the file.
=): Stores the value on the right into the variable on the left; e.g., num = 10 stores the value 10 into the variable num.print("Hello, World!")
The argument "Hello, World!" is passed into the function print(),
which produces the side effect of displaying the text to the screen.
name = input("What is your name? ")
The argument "What is your name?" is passed into the function input(),
which produces the side effect of prompting the user;
the user input is returned and saved into the variable name.
str): Sequence of characters; e.g., "Hello".+ operator to concatenate strings; e.g., "Hello, " + "World"." Hello ".strip()..capitalize(),
.center(),
.count(),
.lower(),
.replace(),
.strip(),
.title(),
.upper()
int): Whole number; e.g., 42, 0, -15.+ (addition), - (subtraction), * (multiplication), / (division).#): Inline note ignored by Python.str, intint() can be used to convert a str to an int.int(input(...)).