1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Introduction to python syntax:
python is a general-purpose programming language used for web applications, data analysis, automation, AI, scripting, etc.
python program is usually read and executed from top to bottom, line by line.
python script is made of statement. (statement is a complete instruction that the interpreter can execute.
syntax designed to be readable and close to plain language.
How python code is structured:
colon starts a block = if/for/def
spaces to indent the code, so its only run when the condition is true
syntax = set of rules that defines how code must be written so that a programming language can understand it.
Data types:
int
float
str (text)
bool
list (many values)
input() (ask the user)
Creating a variable:
python uses the assignment operator ‘=’ to place a value into a variable.
Why conversion is needed:
input from a user is always received as text
numeric information entered through the keyboard must often be converted before calculations can happen.