Introduction to Programming in Python: Data Types, Variables, Control Flow, and File I/O Study Guide | Quizlet

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

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:53 PM on 10/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Interpreted Languages

Languages executed line-by-line at runtime, where each line is parsed and executed as the program runs, such as BASIC, Lisp, Perl, and Python.

2
New cards

Compiled Languages

Languages requiring a compiler to convert source code into machine code before execution, creating an object module linked to form an executable file, such as C, C#, and Fortran.

3
New cards

Hybrid Languages

Languages combining both compilation and interpretation to achieve speed while maintaining portability, such as Java using .jar files.

4
New cards

Assembly Language

A low-level language providing a one-to-one mapping of instructions to processor instructions, resulting in high performance but lacking portability.

5
New cards

Three Categories of Computer Problems

Computational problems (calculations and data processing), logical problems (reasoning and decision-making), and repetitive problems (tasks automated through repetition).

6
New cards

Abstraction

A key principle in computer science that simplifies complex systems by hiding lower-level details, enabling programmers to build higher-level functionalities.

7
New cards

Bit and Byte Specifications

A bit is a single binary digit (00 or 11); a byte consists of 88 bits and can represent 256256 different values (00 to 255255).

8
New cards

Binary Data Type Bit Lengths

Words consist of 1616 bits, longwords consist of 3232 bits, and long-longwords consist of 6464 bits.

9
New cards

String Immutability

The property of Python strings meaning they cannot be altered after creation; changing a string variable reassigns it rather than modifying the original string.

10
New cards

Exponentiation Operator (**)

An arithmetic operator that raises a number to a power, such as 3∗∗3=273**3 = 27.

11
New cards

Floor Division Operator (//)

An arithmetic operator that performs floor division, returning the largest integer less than or equal to the division result, such as 5//3=15 // 3 = 1.

12
New cards

Modulo Operator (%)

An arithmetic operator that returns the remainder of a division, such as 5%3=25 \% 3 = 2.

13
New cards

Python Type Conversion Functions

Built-in functions where str(x) converts to string, int(x) truncates floats to integer, float(x) converts integer to float, and round(x) rounds float to nearest integer.

14
New cards

Do-While Loop

A looping structure that executes its block of code at least once before evaluating its Boolean condition.

15
New cards

Array

A collection of elements, typically of the same data type, stored in contiguous memory locations.

16
New cards

1D Array Indexing Range

Indices in a one-dimensional array start at 00 and extend up to N−1N-1, where NN is the total number of elements.

17
New cards

IndexError in Python

The runtime error raised when attempting to access an array index outside its valid range of 00 to N−1N-1.

18
New cards

Numpy Library

A Python library that enhances array functionality by supporting multi-dimensional arrays, numerical computations, and broadcasting.

19
New cards

Break Statement

A flow control statement used to exit a loop prematurely when a specified condition is satisfied.

20
New cards

Continue Statement

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

21
New cards

Integer Base Format Descriptors (d, b, o, x)

Field descriptors used for output formatting where d represents decimal, b represents binary, o represents octal, and x or X represents hexadecimal.

22
New cards

Numeric Format Descriptors (e, f)

Field descriptors used for output formatting where e or E represents exponential notation and f or F represents floating point format.

23
New cards

Basic File Open Modes ('r', 'w', 'a', 'x')

File access modes where 'r' is read-only, 'w' is write mode (overwrites), 'a' is append mode, and 'x' is exclusive creation.

24
New cards

File Pointer Functions (tell() and seek())

tell() returns the current file pointer position in bytes, while seek(offset) shifts the file pointer position to a specified location.

25
New cards

File Truncation Function (truncate())

A function that allows the caller to end a file at a specified length, discarding all data beyond that given size.