Python Programming Fundamentals and Algorithms

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

1/29

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering core Python language features, operators, control flow, data structures, and mathematical algorithms.

30 Terms

1
New cards

Python

A general-purpose, dynamic, high-level, and interpreted programming language designed to be simple, readable, and versatile.

2
New cards

Dynamic Typing

A feature of Python where variable types do not need to be explicitly declared; the interpreter automatically determines the data type based on the value assigned at runtime.

3
New cards

Identifier

A name used to identify a variable, function, class, module, or user-defined object. In Python, it must begin with a letter or an underscore and can contain letters, digits, and underscores, while being case-sensitive.

4
New cards

pip

The standard package manager for Python (standing for "Pip Installs Packages" or "Pip Installs Python") used to install, manage, and uninstall external libraries hosted on the Python Package Index (PyPI).

5
New cards

Module

A file containing Python code, functions, classes, and variables organized logically to allow code reuse across multiple programs via the import statement.

6
New cards

Floor Division (////)

An arithmetic operator that divides two operands and returns the largest integer that is less than or equal to the quotient (e.g., 20//3=620 // 3 = 6).

7
New cards

Modulus Operator (%\%)

An arithmetic operator that returns the remainder after dividing the first operand by the second operand (e.g., 20%10=020 \% 10 = 0).

8
New cards

Membership Operators

The operators in and not in, which test whether a specified value is a member of a sequence such as a string, list, or tuple.

9
New cards

Identity Operators

The operators is and is not, which compare whether two variables refer to the exact same object in memory.

10
New cards

Break Statement

A loop control statement that immediately terminates the execution of the enclosing loop, regardless of whether the loop's terminating condition has been satisfied.

11
New cards

Continue Statement

A loop control statement that skips the rest of the current loop iteration and proceeds directly to the next iteration.

12
New cards

Tuple

An ordered, immutable collection of elements enclosed in parentheses (), meaning its contents cannot be altered, added, or removed once created.

13
New cards

List Comprehension

A concise Python syntax used to create and populate lists in a single line, following the general form [expression for item in iterable if condition].

14
New cards

Slicing

A technique used to extract a subset of elements from a sequence (such as a string, list, or tuple) by specifying a start, stop, and an optional step index.

15
New cards

Armstrong Number

A number that equals the sum of its own digits each raised to the power of the total number of digits (e.g., 153=13+53+33153 = 1^3 + 5^3 + 3^3 and 9474=94+44+74+449474 = 9^4 + 4^4 + 7^4 + 4^4).

16
New cards

Disarium Number

A number that equals the sum of its digits each raised to the power of its respective 11-based position (e.g., 89=81+9289 = 8^1 + 9^2).

17
New cards

Happy Number

A positive integer that eventually reaches 11 when repeatedly replaced by the sum of the squares of its digits; if the sequence enters an endless cycle not containing 11, it is not happy.

18
New cards

Harshad Number

Also known as a Niven number; an integer that is evenly divisible by the sum of its own digits (e.g., 1818, since 1+8=91 + 8 = 9 and 18%9=018 \% 9 = 0).

19
New cards

Pronic Number

Also known as an oblong or rectangular number; a figurate number that is the product of two consecutive integers, defined as Pn=n×(n+1)P_n = n \times (n + 1).

20
New cards

Curzon Number

An integer nn for which the value 2n+12^n + 1 is evenly divisible by 2n+12n + 1 (e.g., for n=5n = 5, 25+1=332^5 + 1 = 33 is divisible by 2×5+1=112 \times 5 + 1 = 11).

21
New cards

Fibonacci Sequence

A series of numbers starting with 00 and 11, where each subsequent number is the sum of the two preceding ones, governed by the recurrence relation F(n)=F(n−1)+F(n−2)F(n) = F(n-1) + F(n-2) for n>1n > 1.

22
New cards

Natural Numbers

A set of positive whole numbers greater than 00 used to count and order objects, denoted mathematically as N={1,2,3,4,… }N = \{1, 2, 3, 4, \dots\}.

23
New cards

ASCII

American Standard Code for Information Interchange; a character encoding standard that assigns unique numeric values ranging from 00 to 127127 (for 77-bit) or 00 to 255255 (for 88-bit) to represent characters.

24
New cards

Monotonic Array

An array whose elements are ordered such that they are either entirely non-increasing or entirely non-decreasing.

25
New cards

Hamming Distance

The total number of positions at which corresponding characters differ between two strings of identical length.

26
New cards

Isogram

A word or phrase in which no letter is repeated, evaluated in a case-insensitive manner.

27
New cards

Least Common Multiple (LCM)

The smallest positive integer that is divisible by two or more integers without a remainder, defined mathematically for two numbers as LCM(a,b)=∣a×b∣GCD(a,b)\text{LCM}(a, b) = \frac{|a \times b|}{\text{GCD}(a, b)}.

28
New cards

Highest Common Factor (HCF)

The largest positive integer that divides two or more numbers without leaving a remainder; also referred to as the Greatest Common Divisor (GCD\text{GCD}).

29
New cards

Body Mass Index (BMI)

A screening metric for body fatness calculated from height and weight, expressed in metric units as BMI=Weight in kg(Height in m)2\text{BMI} = \frac{\text{Weight in kg}}{(\text{Height in m})^2}.

30
New cards

Quadratic Equation

A second-order polynomial equation in standard form ax2+bx+c=0ax^2 + bx + c = 0 (where a≠0a \neq 0), whose roots are determined using the quadratic formula x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.