Lecture 3: Data Types, Input/Output, and Basic Functions

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

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards reviewing fundamental Python data types, type conversion, string formatting, standard input/output operations, and basic functions.

Last updated 7:56 PM on 9/14/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
<p>Data Type</p>

Data Type

A property of a variable or data value that tells the Python interpreter how to interpret the binary sequence of 11s and 00s stored in computer memory.

2
New cards

Integer

A built-in numerical data type (int) that represents whole numbers without a decimal point, which can be positive, negative, or zero (such as 11, 22, 100100, 00, or −20-20).

3
New cards

Floating-Point Number

A built-in numerical data type (float) that represents numbers containing a decimal point, modeled in scientific notation via a Mantissa and an Exponent.

4
New cards

Mantissa

The component of a floating-point number represented in scientific notation containing the significant digits, assumed to have 11 digit before the decimal point.

5
New cards

Exponent

The power of 1010 by which the Mantissa is multiplied when expressing a floating-point number in scientific notation (e.g., in 1234.567=1.234567×1031234.567 = 1.234567 \times 10^3).

6
New cards

Boolean

A built-in data type (bool) that can hold only one of two case-sensitive values starting with an uppercase letter: True or False.

7
New cards

String

A built-in data type (str) representing text, constructed from individual characters strung together and specified inside matching single (') or double (") quotation marks.

8
New cards

Escape Character

The backslash symbol (\) in Python, which directs the interpreter to interpret the immediately following character in a special manner rather than literally.

9
New cards

String Concatenation

The operation performed by the + operator when placed between two strings, which glues the strings together into a combined single string.

10
New cards

String Multiplication

An operation defined between a string and an integer (<string> * <int>) using the * operator that duplicates and repeats the string a specified number of times.

11
New cards

Truncation

The action that occurs when converting a floating-point number to an integer via int(), where any fractional portion past the decimal point is completely dropped.

12
New cards

repr()

A built-in Python function alternative to str() that produces a string representation of an object, preserving visible quotation marks and escape sequences when printed.

13
New cards

Console

The standard interface window or screen that displays output from a running Python program and receives standard user input entered via keyboard.

14
New cards

input()

A built-in Python function that reads a line of standard input typed by a user until the Enter key is pressed, returning the captured input strictly as a string.

<p>A built-in Python function that reads a line of standard input typed by a user until the Enter key is pressed, returning the captured input strictly as a string.</p>
15
New cards

print()

A built-in Python function that formats and displays literals, variables, or expressions to the console, ending the line automatically unless configured otherwise.

16
New cards

sep parameter

A keyword argument in the print() function (sep="<something>") that customizes the separator placed between printed items instead of the default space.

17
New cards

end parameter

A keyword argument in the print() function (end="<something>") that replaces the default newline character printed at the end of output.

18
New cards

f-string

A formatted string literal starting with f or F containing curly braces {} that evaluate embedded variables, values, or expressions directly within the string.

<p>A formatted string literal starting with <code>f</code> or <code>F</code> containing curly braces <code>{}</code> that evaluate embedded variables, values, or expressions directly within the string.</p>
19
New cards

Format Specifier :.Xf

A syntax option used inside an f-string placeholder (e.g., {value:.5f}) that rounds and formats a floating-point value to exactly X decimal places.

20
New cards

Alignment Specifiers (

Formatting specifiers within f-strings or string methods used to align text within a designated width field: < for left, > for right, and ^ for center.

21
New cards

Banker's Rounding

The rounding strategy employed by Python's :.0f specifier where numbers residing exactly halfway between two integers round to the nearest even integer.

22
New cards

Function

A named block of reusable code that can be invoked using arguments, helping break complex computational problems into smaller manageable sub-tasks.

23
New cards

.rjust()

A string method (.rjust(width, fillchar)) that right-justifies a string within a field of designated width, padding the left side with spaces or a specified single character.

24
New cards

.ljust()

A string method (.ljust(width, fillchar)) that left-justifies a string within a field of designated width, padding the right side with spaces or a specified single character.

25
New cards

.center()

A string method (.center(width, fillchar)) that centers a string within a field of designated width, padding both sides evenly with spaces or a specified single character.