Basic Input and Output

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

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.

15 Terms

1
New cards

Function

A self-contained block of code that performs a specific task, such as printing information.

2
New cards

Function Identifier

The name of the function, typically written in lowercase with underscores between words.

3
New cards

Argument

A value passed to a function within parentheses; may affect how the function behaves.

4
New cards

Return Value

The output that a function gives back after execution. Some functions may not return anything.

5
New cards

print() Function

A built-in function used to display text or data to the console or a file.

6
New cards

print()

objects Parameter

7
New cards

print() sep Parameter

Defines the separator between objects; default is a single space (' ').

8
New cards

print() end Parameter

Defines what’s printed at the end of the output; default is a newline character ('\n').

9
New cards

print() file Parameter

Specifies the destination file object; default is sys.stdout (the console).

10
New cards

print() flush Parameter

Boolean flag to determine whether to flush the output buffer immediately; default is False.

11
New cards

f-string

A formatted string literal in Python using f before the string to embed expressions with {}.

12
New cards

input() Function

A function that prompts the user to enter input from the keyboard; always returns a string.

13
New cards

input() Syntax

input(prompt: string) — displays a prompt and waits for user input.

14
New cards

Data Type of input()

Input received using input() is always treated as a string, even if it looks like a number.

15
New cards