Unit 8 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

how do you add a and b?

A

a+b

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

how do you subtract a from b?

A

b-a

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

how do you multiply a and b?

A

a*b

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

how do you do a divided by b?

A

a/b

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

how do you assign a variable?

A

a=hello

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

how do you find the remainder?

A

10%2

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

what is the output of 10%2?

A

0

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

what does \t add?

A

tab of space

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

what is the formula for printing ‘hello’?

A

print(“hello”)

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

what does a//b give?

A

gives the answer without any decimal points

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

formula for conditional statements

A

input=float(input(“write your guess”))
if(input==25):
print(“You guessed it!”)
else:
print(“Wrong, try again”)

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