Datatyper Flashcards

1
Q

Addition

A

+

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

’ ’ + ’ ’ = ’ ’

A

Konkatenering

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

type(’ ’)

A

Class sträng (str)

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

Class Bool / boolean

A

type(True)

Dvs ger sanningsvärde true/false

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

type(15)

A

Integer / heltal

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

type(15.67)

A

class float / floating point number (flyttal, representerar decimaltal)

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

type([])

A

class list (lista)

Kan innehålla vilka data-typer som helst

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

x=[1, 2, 3]
print(x[1])

A

2

(Listans index börjar alltid från 0)

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