lesson 2 Flashcards

(5 cards)

1
Q

meaning of //

A

floor division

/divides 2 no. and rounds to an integer

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

meaning of %

A

divides two integers and returns the remainder of the divison

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

acronym to remember order

A

PEDMAS

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

note conversions of value

A
  • int. converts to an integer
  • float converts to a floating no. i.e. number with decimals
  • str converts to a string
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

note- int. fractions dont round but chop three decimals

A

-

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