Python Programming Concepts and Fundamentals

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

1/39

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering Python programming concepts including functions, data types, control flow, file I/O, and syntax rules.

40 Terms

1
New cards

Abstraction hides detail and allows a person to view many things as just one thing.

TRUE

2
New cards

Functions as Abstraction Mechanisms

A mechanism by which functions hide lower-level procedural details, primarily through the elimination of redundant or repetitious code.

3
New cards

Function Arguments

The inputs to a function that provide the means for systematically varying the problem instances its algorithm solves by allowing the caller to supply context-specific data.

4
New cards

Top-Down Design

A design methodology where a problem is decomposed into smaller problems, which are gradually solved to produce an overall solution.

5
New cards

Namespace

The set of a program's variables and their current values.

6
New cards

Module-Level Variable Assignment in Functions

The behavior where Python creates a temporary local variable of the same name whose scope exists only within the function when an attempt is made to assign or change a module-level variable without explicit global declaration.

7
New cards

Default Arguments

Optional function parameters assigned default values in the function header using the syntax <key>=<value>; they simplify design, make functions more general, and must be listed after required arguments.

8
New cards

Scope of a Parameter Variable

The entire body of the function in which the parameter is introduced, remaining invisible outside of that function.

9
New cards

Equality Operator (==)

An operator that compares the values or contents of two objects and returns True if they hold the same contents, even if they are not aliases for the same object in memory.

10
New cards

List Index

A unique positive integer specifying the exact position of an item in a list, ranging from 00 to the list length minus 11.

11
New cards

Mutator

A method devoted entirely to the modification of the internal state of an object.

12
New cards

range(upper)

A function that, when passed a single numeric argument upperupper, generates a sequence of integers from 00 through upperโˆ’1upper - 1 (for example, range(50) generates integers 00 through 4949).

13
New cards

main Function

A standard architectural function in Python scripts that usually expects no arguments and returns no value.

14
New cards

Tuple

An immutable sequence data structure whose contents cannot be altered after creation, recommended whenever a list's structure will not need to change.

15
New cards

Return Value of sort()

The special value None, returned automatically because sort() is an in-place mutator method.

16
New cards

Default Function Return Value

The special value None, automatically returned by any Python function whose definition does not include a return statement.

17
New cards

Docstring

A documentation string literal that is indented and placed on the line immediately following the def header of a function.

18
New cards

help() Function

A Python shell command used to view documentation that displays the docstring of a function when passed the function's name (e.g., help(calculate)).

19
New cards

Dictionary

A lookup table data structure enclosed in curly braces {} that maps unique keys to values using the format key: value separated by commas.

20
New cards

String

A sequence of zero or more characters.

21
New cards

Index Out of Range Error

An error raised when attempting to access an element of a sequence using an index equal to or greater than the sequence's length.

22
New cards

FTPS

A network protocol that utilizes encryption for secure data transfer.

23
New cards

Base 10 Numbering System

The decimal number system, which utilizes 1010 digits from 00 through 99.

24
New cards

Hexadecimal Number System

The base-1616 numbering system, which represents digit values greater than 9109_{10} using letters.

25
New cards

Python Object Model

The design principle in Python stating that all data values are objects.

26
New cards

isalpha()

A string method that returns True if the string contains only alphabetic letters, and False otherwise.

27
New cards

lower()

A string method that returns a copy of the target string with all characters converted to lowercase.

28
New cards

File Mode 'r'

A mode string used in Python's open() function that specifies opening a file for read access.

29
New cards

readline()

A file access method that reads a single line of input from a file and returns it as a string, including the newline character.

30
New cards

os.getcwd()

A function in the os module that returns the directory path of the current working directory.

31
New cards

Count-Controlled Loop

A loop structure that counts through a specified range of numbers.

32
New cards

%d Format Specifier

A string formatting specifier in Python indicating that the associated variable is formatted as an integer.

33
New cards

Selection Statement

A control structure, such as the if-else statement, that allows a computer to make choices and selectively execute code based on test conditions.

34
New cards

%f Format Specifier

A string formatting specifier written in the form <field width>.<precision>f used to format floating-point numbers to a designated precision.

35
New cards

Boolean / Logical Operators in Python

The built-in logical keywords in Python: and, or, and not (excluding xor).

36
New cards

Sentinel Value

A special input value provided by the user to terminate a conditional iteration loop, such as a while loop.

37
New cards

Entry-Control Loop

An alternate term for a while loop, so named because its continuation condition is evaluated at the top before the loop body executes.

38
New cards

Python Variable Naming Rules

Syntax rules stating that variable names can begin with a letter or underscore and contain any number of letters, digits, or underscores, but cannot begin with a digit.

39
New cards

Modulus Operator (%)

An arithmetic operator that returns the remainder of the division of two numbers (such as returning 22 for the expression 6ย %ย 46 \text{ \% } 4).

40
New cards

int() Float Conversion

A conversion process in Python where the int() function converts a float to an integer by truncating or removing its fractional portion.