wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Types and Conversion Quiz

Total questions: 4

Worksheet time: 2mins

Name
Class
Date
1.

Given below is a program to convert a float into an integer. temp=37.69 newtype= (a)   print(newtype) Fill up the missing code and write the output.

2.

What is a variable in Python?

a)

A type of Python data structure

b)

A reserved memory location to store values

c)

A specific Python function

d)

A data type

3.

How can you convert the string `"123"` to an integer in Python?

a)

int("123")

b)

str(123)

c)

"123".toInt()

d)

convert("123", int)

4.

Which of the following is NOT a numeric data type in Python?

a)

int

b)

float

c)

complex

d)

char