CDT Flashcards

study (13 cards)

1
Q

how to import something from a random number?

A

from random import randint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how to set ‘guessing’ to false

A

guessing = False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

the 3 letters that go before a number statement

A

int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

sleep for 8 seconds

A

sleep(8)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

set highlight colour red

A

SetHighlightColour(RED)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

set a random number from 1 - 100

A

number = randint(1,100)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

set the variable ‘guessing’ to true, using while?

A

while guessing == True:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is a boolean?

A

A true or False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a float?

A

number with a decimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

is this correct? and why/why not
numba = input(“Choose a number”)
if number == “5”:
print(“correct”)

A

No. because the top variable name doesn’t match the variable name after ‘if’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is the concatenate sybol?

A

+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is the assignment/comparison operator?

A

=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

name 3 logical operators?

A

or, and, in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly