Module 1-8,9 & Module 2-1,2

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

1/8

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.

9 Terms

1
New cards

Characteristics of Sets (3)

  • duplicates are not allowed

  • order does not matter (no indexing or slicing notation)

  • immutable elements

2
New cards

Characteristics of Tuples

  • duplicates are allowed

  • they are immutable

  • able to use index and slicing notation

3
New cards

What is the value based For Loop?

Meaning for each element in a list, we do something

4
New cards

What is the range() function?

Generates a sequence of numbers

  • range(stop): generates numbers from 0 to stop -1

  • range(start, stop): generates numbers from start to stop but does not include stop point

  • range(start, stop, step)

5
New cards

Iterable

any data collection type capable of returning its members one at a time, allowing it to be looped over in a for loop.

6
New cards

Can you use index looping for sets?

No

7
New cards

Boolean values

Either true or false

Case sensitive

8
New cards

Precedence of Boolean Operators

  1. not

  2. and

  3. or

    (values in parenthesis are always evaluated first)

9
New cards

 Which of the following data type in Python are mutable? 

A) List 

B) Tuple 

C) String 

D) Set 

A, D