ENGI-1020 Lecture 5: Flow Control, Type Casting & Scripts

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering conditional branching, syntax rules, functions, variables, data types, type casting, and Python scripts from Lecture 5 of ENGI-1020.

Last updated 12:54 PM on 10/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

Proposition

Whatever evaluates to True or False (a Boolean value) in Python.

2
New cards

Branching

A compound statement in Python that stretches across more than one line of code to direct program flow.

3
New cards

Header

The top line of a compound statement containing a keyword (such as if), a condition, and a colon (:).

4
New cards

Body

The indented statements positioned under a header that are executed sequentially IF the condition evaluates to True.

5
New cards

Nested Conditionals

IF statements placed inside other IF statements, requiring indentation to make complex, multi-tiered decisions.

6
New cards

Maximum Safe Deceleration

4.5 m/s24.5\,\text{m/s}^2; the maximum deceleration threshold safe for an average driver to maintain control.

7
New cards

Syntax

Strict and unambiguous rules to follow in programming; failure to follow proper programming syntax prevents a program from running.

8
New cards

Function

A block of code which only runs when it is called.

9
New cards

Parameters

Data passed into a function, written in a comma-separated list inside parentheses following the function name.

10
New cards

Variable

A name assigned to a location in computer memory where information is held. Variables themselves do not have types; values do.

11
New cards

bool

A Python data type used for Boolean (True/False) values.

12
New cards

int

A Python data type used for integer (whole number) values.

13
New cards

float

A Python data type used for real numbers (numbers containing a decimal).

14
New cards

str

A Python data type used for names and arbitrary-length text.

15
New cards

type()

A built-in Python function that returns the data type of a value or the current value stored in a variable.

16
New cards

Type Conversion (Casting)

The process of converting values from one data type to another using built-in functions such as int(), float(), str(), or bool().

17
New cards

Comments

Helpful descriptive text intended for people rather than the computer; denoted by # to the end of the line, or enclosed between triple single or double quotes.

18
New cards

Python Script

A sequence of Python statements and comments saved in plain-text format.