Python Operators and Beginner Programming Concepts

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/37

flashcard set

Earn XP

Description and Tags

A set of 38 vocabulary flashcards covering Python operators, functions, and basic programming concepts discussed in the lecture.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

38 Terms

1
New cards

Operators

Symbols in Python that perform operations on variables and values.

2
New cards

Arithmetic Operators

Operators that carry out basic math calculations such as addition, subtraction, multiplication, and division.

3
New cards

Comparison Operators

Operators that compare two values and return a Boolean result (True or False).

4
New cards

Logical Operators

Operators (and, or, not) that combine or modify Boolean expressions.

5
New cards

Addition Operator (+)

Performs addition of two numbers.

6
New cards

Subtraction Operator (-)

Calculates the difference between two numbers.

7
New cards

Multiplication Operator (*)

Finds the product of two numbers.

8
New cards

Division Operator (/)

Returns the quotient of two numbers including decimals.

9
New cards

Floor Division Operator (//)

Performs division and returns only the integer part of the quotient.

10
New cards

Modulus Operator (%)

Returns the remainder of a division operation.

11
New cards

Exponentiation Operator (**)

Raises one number to the power of another.

12
New cards

Equal To Operator (==)

Checks if two values are exactly the same.

13
New cards

Not Equal To Operator (!=)

Checks if two values are different.

14
New cards

Greater Than Operator (>)

Tests whether the left operand is larger than the right operand.

15
New cards

Less Than Operator (<)

Tests whether the left operand is smaller than the right operand.

16
New cards

Greater Than or Equal Operator (>=)

Checks if the left operand is larger than or equal to the right operand.

17
New cards

Less Than or Equal Operator (<=)

Checks if the left operand is smaller than or equal to the right operand.

18
New cards

and Operator

Returns True only if both combined conditions are True.

19
New cards

or Operator

Returns True if at least one of the combined conditions is True.

20
New cards

not Operator

Reverses the Boolean value of a condition (True becomes False, and vice versa).

21
New cards

input() Function

Reads a line of user input as a string.

22
New cards

float() Function

Converts a value to a floating-point number.

23
New cards

int() Function

Converts a value to an integer.

24
New cards

print() Function

Outputs text or variable values to the console.

25
New cards

Division by Zero

An invalid operation in which a number is divided by 0; must be avoided or handled in code.

26
New cards

Even Number

An integer divisible by 2 with a remainder of 0.

27
New cards

Odd Number

An integer that leaves a remainder of 1 when divided by 2.

28
New cards

Product

The result of multiplying two numbers.

29
New cards

Sum

The result of adding two numbers.

30
New cards

Attendance Percentage

The ratio of classes attended to classes held, multiplied by 100.

31
New cards

total_classes Variable

Stores the number of classes held in the attendance program.

32
New cards

attended_classes Variable

Stores the number of classes a student actually attended.

33
New cards

if Statement

A control structure that executes code only when a specified condition is True.

34
New cards

else Statement

Provides an alternative block of code that runs when the if condition is False.

35
New cards

Condition

An expression that evaluates to True or False and determines program flow.

36
New cards

Remainder

The leftover part of a division operation, obtained with the modulus operator.

37
New cards

Boolean Result

The True or False outcome returned by comparison or logical operations.

38
New cards

Floor Division

Division that truncates the decimal portion, leaving only the integer part of the quotient.