booleans, comparisons, conditionals

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

1/5

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

6 Terms

1
New cards

boolean

basic python type. there are only two possible values: True and False. notice the capitalization

2
New cards

comparisons

== equal to

! = not equal to

3
New cards

in operator

looks to see if an item is a member of a sequence

4
New cards

truthiness and falsy

falsy: none, 0, empty

truthy: everything else

5
New cards

if elif conditionals

if test:

code if True

elif test 2:

code if True

code must be indented, else and if must be same level of indentation

6
New cards

generating random numbers

must be imported

import random

random.randint(2,4)