Free Online Flashcard Deck

1 Programming Foundations for Data Science Free Online FlashCards

Study 1 Programming Foundations for Data Science with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is a Python variable?

Back

A variable is a name bound to a value. The same name can later refer to a value of a different type.

02
Front

What does a value’s data type determine?

Back

A value’s data type determines which operations make sense for it.

03
Front

What characterizes a Python list?

Back

A list is an ordered, changeable sequence, suitable for values that may be added, removed, or updated.

04
Front

What distinguishes a tuple from a list?

Back

A tuple is an ordered sequence that cannot be changed after creation.

05
Front

What is a Python dictionary useful for representing?

Back

A dictionary is a changeable mapping from keys to values, useful for representing records with named fields.

06
Front

What is a key property of a Python set?

Back

A set stores distinct values and is useful for membership checks or removing duplicates. It has no positional indexing.

07
Front

At what index does a Python list or tuple begin?

Back

Lists and tuples use positions starting at index 0, so the first element is accessed at index 0.

08
Front

How do you check a collection’s size and membership?

Back

Use len(collection) to get its size and value in collection to test whether it contains a value.

09
Front

How do if, elif, and else divide conditional logic?

Back

if tests the first condition, elif checks another if earlier tests were false, and else handles the remaining case.

10
Front

Why use is None instead of a general truth test?

Back

Use is None to check specifically for None. Empty collections and zero are also false in conditions, but are not None.

11
Front

When is a for loop useful?

Back

A for loop visits each item in an iterable, such as a list or dictionary.

12
Front

What keeps a while loop repeating?

Back

A while loop repeats as long as its condition remains true. Make sure the condition can eventually become false to avoid an endless loop.