Intro to Python- 3345- TTU with complete verified solutions 2025 (GUARANTEED PASS)

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

1/79

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

80 Terms

1
New cards

CPU

the brain of the computer, responsible for executing instructions and performing calculations.

2
New cards

Motherboard

serves as the main circuit board that connects and allows communication between all the other components of the computer, such as CPU, memory, storage, and peripherals.

3
New cards

RAM

temporarily stores data and instructions that the CPU needs to access quickly. It provides fast read and write access for active programs and the operating system.

4
New cards

Input Devices (Mouse, Keyboard, Touchpad)

Input devices allow users to interact with the computer by providing input, such as typing text, moving a cursor, or clicking on icons.

5
New cards

Output Devices (Monitor, Printer, Speakers)

Output devices display or produce information generated by the computer, such as text, images, or sound, to users.

6
New cards

String Literal

a sequence of characters enclosed within either single (' ') or double (" ") quotation marks. It represents a fixed sequence of characters as a value.

7
New cards

Numeric Literal

a numerical value used to represent numbers. Numeric literals can be integers, floating-point numbers, or complex numbers.

8
New cards

String

a sequence of characters enclosed within either single (' ') or double (" ") quotation marks. Strings are immutable, meaning their values cannot be changed after creation.

9
New cards

Compiler

a program that translates source code written in a high-level programming language into machine code or bytecode that a computer can execute directly.

10
New cards

Garbage Collection

a process in computer science where the runtime system automatically deallocates memory occupied by objects that are no longer in use by the program.

11
New cards

Secondary Memory

refers to storage devices that can retain data persistently even when the computer is turned off. Examples include hard disk drives (HDDs), solid-state drives (SSDs), USB flash drives

12
New cards

Operating System

system software that manages hardware resources and provides essential services to enable the execution of application programs. It facilitates communication between hardware and software components and provides a user interface for interacting with the computer.

13
New cards

Utility Program

type of software that performs specific tasks related to system maintenance, management, or optimization. These programs typically assist users in performing routine tasks efficiently

14
New cards

Program

set of instructions written in a programming language that performs a specific task or set of tasks when executed by a computer.

15
New cards

Software

collection of programs, data, and instructions that enable a computer system to perform tasks and execute programs. It includes both system software (e.g., operating systems) and application software (e.g., word processors, web browsers)

16
New cards

Programmer

an individual who writes, debugs, and maintains software programs by creating sets of instructions using programming languages

17
New cards

Binary/Dichotomy/Boolean

Binary refers to a base-2 numbering system used in computers, representing numbers using only two digits: 0 and 1.

Dichotomy refers to a division into two parts.

Boolean refers to a data type that represents truth values (True or False).

18
New cards

Machine Learning

low-level programming language consisting of binary code that a computer's central processing unit (CPU) can execute directly.

19
New cards

Interpreter

a program that directly executes instructions written in a high-level programming language without the need for compilation.

20
New cards

Assembly Language

low-level programming language that uses mnemonic codes to represent instructions that can be directly understood by a computer's CPU. It is one step above machine language and requires an assembler to translate into machine code.

21
New cards

High-Level Language

closer to human language and easier to read and write than low-level languages

22
New cards

Source Code

refers to the human-readable instructions written in a programming language before they are translated into machine code by a compiler or interpreter

23
New cards

Script

a sequence of instructions written in a scripting language, typically interpreted rather than compiled. Python scripts are commonly used for automating tasks or running small programs.

24
New cards

Flowchart

a graphical representation of the sequence of steps or operations in a process, typically used in software development to visualize algorithms or program logic.

25
New cards

Pseudocode

simplified, high-level description of a computer program or algorithm, written in plain language with some programming-like syntax. It helps in planning and designing algorithms before writing actual code.

26
New cards

Algorithm

step-by-step procedure or set of rules for solving a computational problem or accomplishing a specific task.

27
New cards

Keywords

reserved words in a programming language that have special meanings and cannot be used as identifiers

28
New cards

Bit

bit is the smallest unit of data in a computer, representing a binary digit (0 or 1). It is the basic building block of digital computing.

29
New cards

Byte

unit of digital information that consists of 8 bits. It is commonly used to represent characters in text and data storage.

30
New cards

ASCII (American Standard Code for Information Interchange)

character encoding standard that assigns numeric codes to represent characters. It uses 7 bits to represent 128 characters.

31
New cards

Data Type

classification that specifies the type of data that a variable can hold and the operations that can be performed on it.

32
New cards

Float

a data type in Python used to represent floating-point numbers (numbers with a fractional part).

33
New cards

Integer

A data type representing whole numbers.

34
New cards

Function/Calling a Function:

Function: A block of reusable code that performs a specific task when called.

Calling a Function: Invoking or executing a function to perform its specified task.

35
New cards

Operator

a symbol that performs a specific operation on one or more operands.

36
New cards

Variable

a named storage location in memory used to store data that can be manipulated or changed during program execution.

37
New cards

Memory Address

unique identifier assigned to each location in the computer's memory where data can be stored or retrieved.

38
New cards

CamelCase

a naming convention where multiple words are joined together, and each word's initial letter, except the first one, is capitalized.

39
New cards

Exception/Exception Handler/Try/Except:

Exception: An event that occurs during the execution of a program that disrupts the normal flow of instructions.

Exception Handler: A block of code that handles exceptions raised during program execution.

Try/Except: Constructs used in Python for exception handling, where code within the 'try' block is executed, and if an exception occurs, it is caught and handled by the 'except' block.

40
New cards

Escape Characters/Concatenation/F-String:

Escape Characters: Special characters preceded by a backslash () used to represent non-printable or special characters in strings.

Concatenation: The process of combining two or more strings into a single string.

F-String: A formatted string literal prefixed with 'f' or 'F' that allows embedding expressions within curly braces {}.

41
New cards

Precision Designator/Type Designator/Alignment Designator:

Precision Designator: Specifies the precision of a floating-point number when formatting.

Type Designator: Specifies the data type of a variable or value.

Alignment Designator: Specifies the alignment of data when formatting output.

42
New cards

Range Function

generates a sequence of numbers within a specified range, with optional start, stop, and step arguments.

43
New cards

If-Elif-Else:

Conditional statements used for decision-making in Python. 'If' is used for the primary condition, 'elif' for additional conditions, and 'else' for a default condition.

44
New cards

Def/Defining Function (header components, body, types of functions(void, value-returning))

'def' is a keyword used to define a function in Python.

Defining Function Components: Includes the function name, parameters, and an optional return statement.

- Header Components: The header of a function includes the function name and parameters.

- Body: The body of a function contains the block of code that gets executed when the function is called.

- Types of Functions:

1. Void Functions: Functions that do not return any value. They typically perform an action or task without returning a result.

2. Value-Returning Functions: Functions that return a value after performing a specific task or computation.

45
New cards

Pass

used as a placeholder indicating "do nothing". It's often used when a statement is syntactically required but you want to express that you're not intending to execute any code.

46
New cards

Local Variable

variable defined within the scope of a function. It can only be accessed within that function.

47
New cards

Global Variable

variable defined outside of any function or in a global scope. It can be accessed from anywhere within the program.

48
New cards

Variable Scope

defines the visibility and lifetime of a variable.

49
New cards

Argument (Data)

Data passed to a function when it is called. Arguments are specified within the parentheses of the function call.

50
New cards

Parameter (Variable)

Variables used to receive arguments in a function definition. Parameters are specified within the parentheses of the function header.

51
New cards

Import

used in Python to import modules or packages into a program. It allows you to use functionality defined elsewhere.

52
New cards

Return Statement

The return statement is used to exit a function and optionally return a value back to the caller. It can only be used inside a function. When the return statement is executed, the function exits immediately, and the control is returned to the caller along with the value specified, if any.

53
New cards

Read/Write from File

'r': Opens a file for reading. The file must exist.

'a': Opens a file for appending. The file is created if it does not exist.

'w': Opens a file for writing. If the file already exists, it gets overwritten. If it doesn't exist, a new file is created.

54
New cards

Readline

A method used to read a single line from a file.

55
New cards

Read Position

The position within a file where the next read or write operation will occur.

56
New cards

Strip

used to remove leading and trailing whitespace characters (spaces, tabs, newline characters) from a string.

57
New cards

Field

A single piece of data within a record.

58
New cards

Traceback

A report of the function calls made by the Python interpreter when an error occurs. It helps in understanding the sequence of function calls leading up to the error.

59
New cards

Exception Handler

A block of code that handles exceptions raised during the execution of a program. It helps in gracefully handling errors and preventing program termination.

60
New cards

Try/Except

Try: A block of code where exceptions may occur. It is used to encapsulate code that might raise an exception.

Except: A block of code that handles exceptions. It is executed when an exception occurs within the corresponding try block.

61
New cards

Sequence

An ordered collection of items. Examples include strings, lists, and tuples.

62
New cards

List

A mutable sequence of elements, represented by square brackets []. Lists can contain elements of different types and can be modified after creation.

63
New cards

Tuples

An immutable sequence of elements, represented by parentheses (). Tuples are similar to lists but cannot be modified after creation

64
New cards

Mutable

Objects whose state can be modified after creation.

65
New cards

Slicing

A mechanism for extracting a portion of a sequence (like a list or a string) by specifying a start index, an end index, and an optional step size.

66
New cards

Search with 'in':

A method used to check if a value is present in a sequence (e.g., list, tuple, string) by using the 'in' keyword.

67
New cards

List Methods

Append: Adds an element to the end of the list.

Index: Returns the index of the first occurrence of a value in the list.

Insert: Inserts an element at a specified position in the list.

Sort: Sorts the elements of the list in ascending order.

Remove: Removes the first occurrence of a value from the list.

Reverse: Reverses the order of elements in the list.

68
New cards

'del' Delete

The 'del' statement is used to delete a reference to an object. It can be used to delete elements from a list or to delete variables.

69
New cards

Random

used to generate random numbers and perform random selections.

70
New cards

Writelines

used to write multiple lines to a file at once. It takes a list of strings as input and writes each string as a separate line in the file.

71
New cards

List Comprehension

A concise way to create lists in Python. It allows you to create a new list by applying an expression to each item in an existing iterable.

72
New cards

List Dimensionality (2-d)

Refers to a two-dimensional list, also known as a list of lists. It's a list where each element is itself a list.

73
New cards

Indexing

Refers to accessing individual characters within a string by their position.

74
New cards

Len

Returns the length of the string, i.e., the number of characters in the string.

75
New cards

Concatenation

Combining two or more strings together

76
New cards

Searching

Finding the occurrence of a substring within a string.

77
New cards

IndexError

An exception raised when trying to access an index that is out of range in a sequence, such as a list or a string.

78
New cards

String Methods

Lower: Converts all characters in a string to lowercase.

Lstrip: Removes leading whitespace characters from a string.

Rstrip: Removes trailing whitespace characters from a string.

Strip: Removes leading and trailing whitespace characters from a string.

Upper: Converts all characters in a string to uppercase.

Endswith: Checks if a string ends with a specified suffix.

Find: Returns the lowest index of a substring within a string, or -1 if the substring is not found.

Replace: Replaces occurrences of a substring with another substring in a string.

Startswith: Checks if a string starts with a specified prefix.

Split: Splits a string into a list of substrings based on a delimiter.

79
New cards

Tokens and Delimiters

Tokens: Individual units of a sequence, often separated by delimiters. For example, words in a sentence or elements in a comma-separated list.

Delimiters: Characters used to separate tokens within a sequence. For example, spaces, commas, or any other specified characters.

80
New cards

Dictionary

a built-in data structure that is used to store collections of key-value pairs. Dictionaries are defined using curly braces {} and key-value pairs separated by colons :.