wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Operatori aritmetici e tipi di dati in Python

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

Qual è il risultato di 7 / 2 in Python?

a)

3

b)

3.0

c)

3.5

d)

2

2.

Per cosa si usa l'operatore ** in Python?

a)

Per sommare due numeri

b)

Per calcolare il valore di una potenza

c)

Per dividere due numeri

d)

Per concatenare due stringhe

3.

Quale sarà il risultato di 0/7 in Python?

a)

0

b)

0.0

c)

1.0

d)

ZeroDivisionError

4.

Quale sarà il risultato di 7/0 in Python?

a)

0

b)

0.0

c)

1.0

d)

ZeroDivisionError

5.

Quale dei seguenti è un tipo di dato numerico in Python?

a)

float

b)

list

c)

str

d)

bool

6.

Quale dei seguenti è il tipo di dato che rappresenta un valore di verità (vero o falso)?

a)

Integer

b)

Float

c)

Stringa

d)

Booleano

7.

Qual è la differenza principale tra un int e un float in Python?

a)

Un int è un numero decimale, mentre un float è un numero intero

b)

Un int rappresenta un numero intero, mentre un float rappresenta un numero decimale

c)

Non c'è alcuna differenza

d)

Un int è un tipo di dato booleano, mentre un float è un tipo di dato stringa

8.

Qual è il valore booleano che rappresenta "vero" in Python?

a)

True

b)

False

c)

1

d)

None

e)

true

9.

Cosa restituisce type(3.14) in Python?

a)

<class 'int'>

b)

<class 'float'>

c)

<class 'str'>

d)

<class 'bool'>

10.

Quale di questi è un tipo di dato stringa in Python?

a)

"123"

b)

123

c)

1.23

d)

True

11.

Qual è il tipo di dato per rappresentare il numero 10 in Python?

a)

Stringa

b)

Float

c)

Integer

d)

Booleano

12.

Quale dei seguenti valori è di tipo integer in Python?

a)

"10"

b)

10.0

c)

10

d)

True

13.

Che tipo di dato è la variabile x = "Hello" in Python?

a)

Integer

b)

Float

c)

Stringa

d)

Booleano

14.

Quale dei seguenti valori è di tipo float in Python?

a)

"3.14"

b)

3.14

c)

3

d)

3.0

15.

Qual è il tipo di dato della variabile x = 100 in Python?

a)

Float

b)

Stringa

c)

Booleano

d)

Integer

16.

Che cosa restituisce la funzione type() in Python?

a)

Il valore di una variabile

b)

Il tipo di dato di un oggetto

c)

La somma di due numeri

d)

Un errore di sintassi

17.

Quale tipo di dato restituisce type(5) in Python?

a)

<class 'str'>

b)

<class 'float'>

c)

<class 'int'>

d)

<class 'list'>

18.

Che cosa restituirà type("Python")?

a)

<class 'int'>

b)

<class 'str'>

c)

<class 'float'>

d)

<class 'bool'>

19.

Cosa restituirà il codice seguente?

type(3 == 4)

a)

<class 'int'>

b)

<class 'bool'>

c)

<class 'str'>

d)

<class 'float'>

20.

Che risultato restituirà il seguente codice?

type(10 + 3.5)

a)

<class 'int'>

b)

<class 'float'>

c)

<class 'str'>

d)

<class 'bool'>