Python - Casting

Python - Casting

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Class XI Basics

Class XI Basics

11th - 12th Grade

15 Qs

Computational Thinking - Review

Computational Thinking - Review

7th - 9th Grade

15 Qs

PC1.8 Evaluate computer program

PC1.8 Evaluate computer program

9th Grade

10 Qs

Coding Quiz

Coding Quiz

6th - 10th Grade

15 Qs

Recap: Introduction to Python

Recap: Introduction to Python

10th Grade

10 Qs

Input Devices of Computer

Input Devices of Computer

11th Grade

10 Qs

ว30285-ทดสอบเรื่องคำสั่งแบบเงื่อนไข

ว30285-ทดสอบเรื่องคำสั่งแบบเงื่อนไข

10th Grade

10 Qs

REMIDI PROGDAS

REMIDI PROGDAS

12th Grade

15 Qs

Python - Casting

Python - Casting

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

J Joel Thomas

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Converting one datatype to the other in Python is known as

Conversion

translation

transformation

casting

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many constructs does Python support for casting?

4

3

2

none

3.

MATCH QUESTION

1 min • 1 pt

Match the following

not supported in Python

text()

not supported in Python

decimal()

float()

converts to string literals

converts floats, string literals to int

converts int, string to floats

str()

int()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output of the following?

text("hello")

text() is not defined in Python

will be 'hello'

will be "hello"

will be hello

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is int in Python?

All whole numbers both positive and negative excluding 0

All whole numbers both positive and negative including 0

All positive whole numbers including 0

All negative whole numbers including 0

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is 0 an int or float or str

All the above

float

int

str

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How can you convert 3.8 into a str literal?

By adding speech marks around 3.8

By using str(3.8)

By using text(3.8)

3.8 is a number and cannot be converted to a str literal

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?