CSIT111 Decisions and Conditionals Quiz Ultimate Study Guide

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

1/20

encourage image

There's no tags or description

Looks like no tags are added yet.

21 Terms

1
New cards

Boolean

A data type that has two possible values: True and False.

2
New cards

Truthy Value

A value that evaluates to True in a conditional context.

3
New cards

Falsy Value

A value that evaluates to False in a conditional context.

4
New cards

Comparison Operators

Operators that compare two values and return a Boolean result, such as ==, !=, >,

5
New cards

if Statement

A control structure that executes a block of code if its condition evaluates to True.

6
New cards

else Statement

A control structure that executes a block of code if the preceding if condition evaluates to False.

7
New cards

elif Statement

A control structure that provides an additional condition to test if the preceding if condition was False.

8
New cards

Logical Operators

Operators that combine conditional statements: and (both must be True), or (at least one must be True), not (inverts the Boolean value).

9
New cards

Ternary Operator

A concise way to write an if-else statement in a single line, formatted as: value_if_true if condition else value_if_false.

10
New cards

Operator Precedence

The rules that determine the order in which operations are performed in expressions.

11
New cards

Nested Decisions

When an if statement contains another if statement within its block, requiring multiple conditions to be checked.

12
New cards

Chained Decisions

Multiple if statements joined with elif, allowing for more than two possible execution paths.

13
New cards

SyntaxError

An error that occurs when the code is not properly formatted according to Python syntax rules.

14
New cards

IndentationError

An error that occurs when there is inconsistent or incorrect use of indentation in Python.

15
New cards

Control Flow

The order in which individual statements, instructions, or function calls are executed in a program.

16
New cards

bool() Function

A built-in function that converts a value to a Boolean (True or False) based on its truthiness.

17
New cards

Type Casting

The process of converting one data type into another, such as converting a string to an integer.

18
New cards

Execution Path

The specific sequence of executed code based on conditional tests.

19
New cards

Input Conversion Trap

The scenario where input from the user is treated as a string, even if it represents a number, unless explicitly converted.

20
New cards

Boolean Evaluation.

Determining the truth value of an expression using Boolean logic.

21
New cards

Short-Circuit Evaluation

The process where Python evaluates conditions only as far as necessary, stopping early if the result is determined.