Back to marketplace

Python Basics

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Declarative Knowledge

Back (Answer)

A statement of fact it does not tell you have to do stuff

#2
Front (Question)

Imperative Knowledge

Back (Answer)

A recipe or “how-to” (this tells you how to do something) Also know as an algorithm

#3
Front (Question)

What is a recipe?

Back (Answer)

1) A sequence of simple steps 2) Flow of control that specifies when each step is executed 3) Determining when to stop

#4
Front (Question)

Syntax

Back (Answer)

Is passing of a sentence/string

#5
Front (Question)

Static semantics

Back (Answer)

Is which syntactically valid strings have meaning

#6
Front (Question)

Semantics

Back (Answer)

Is the meaning associated with syntactically correct string of symbols with no static semantic errors

#7
Front (Question)

Program

Back (Answer)

Is a sequence of definitions and commands • definitions are evaluated • commands are executed

#8
Front (Question)

Commands

Back (Answer)

Statements - instruct interpreter to do something

#9
Front (Question)

Data objects

Back (Answer)

is what the program is manipulating

#10
Front (Question)

Objects are

Back (Answer)

scalar (cannot be subdivided) non-scalar (have internal structure that can be accessed)

#11
Front (Question)

Object type

Back (Answer)

defines what the programs can do to them

#12
Front (Question)

Scalar objects in Python

Back (Answer)

• Integers (int) • Real numbers (float) • Boolean (bool) • Special (NoneType)

#13
Front (Question)

cast

Back (Answer)

convert objects of one type to another

#14
Front (Question)

combine objects and operators

Back (Answer)

#15
Front (Question)

operator precedence without parentheses

Back (Answer)

** * / \+ and - execute left to right parentheses always have top priority and get done first and will be evaluated inside out.

#16
Front (Question)

assignment

Back (Answer)

equal sign is an assignment of a value to a variable name • value stored in computer memory • an assignment binds name to value • retrieve value associated with name or variable by invoking the name

#17
Front (Question)

Abstracting expressions

Back (Answer)

• give names to values of expressions • reuse names instead of values • easier to change code later

#18
Front (Question)

Branching

Back (Answer)

• make a choice and do different things • each statement gets executed once • runs in constant time

#19
Front (Question)

Variables (bindings)

Back (Answer)

• name (descriptive, meaningful, re-read code, no keywords) • value (can be updated) • right hand side -> VALUE • left hand side -> VARIABLE

#20
Front (Question)

String

Back (Answer)

• letters, special characters, spaces, digits • enclosed in quotation marks or single quotes • concatenate strings by using the + operator

#21
Front (Question)

overloaded the + operator

Back (Answer)

is when using the + sign to concatenate two or more strings together

#22
Front (Question)

for loops

Back (Answer)

• known number of iterations • can end early via break • use a counter • can rewrite a for loop using while loop

#23
Front (Question)

while loops

Back (Answer)

• unbound number of iterations • can end early via break • can use a counter, but must initialize before loop and increment inside loop • may not be able to rewrite a while loop using a for loop

#24
Front (Question)

compare/test object type

Back (Answer)

• type(object) returns the type of the object - isinstance(object, type) testing if an object is of a certain type