COS - Python & Pandas Final Exam

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

1/8

flashcard set

Earn XP

Description and Tags

if i ace my exam im posting this public.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

What data type does input() return?

The input() function in Python returns data as a string type, regardless of what the user enters.

2
New cards

What is a syntax error?

A syntax error occurs when the code violates the rules of the Python language, preventing it from being executed. This often involves mistakes in formatting, such as missing colons, parentheses, or indentation issues.

3
New cards

What is a sentinel value?

A sentinel value is a special, unique marker (like -1 or "exit") used in programming to signal the end of data or a condition, telling a loop to stop running, even when you don't know how many items are coming. It's a "flag" that's clearly different from real data, like entering "-1" to stop a list of positive scores. 

4
New cards

What does len() do?

The len() function simply counts and returns the number of items in a collection, like characters in a text string ("hello" has a length of 5), items in a list ( [1,2,3] has a length of 3), or key-value pairs in a dictionary. It's a universal way to ask "how many?" for things that hold multiple elements. 

5
New cards
6
New cards
7
New cards
8
New cards
9
New cards