Search Header Logo

Pearson 1CP2 - 1.3 - Data Types

Authored by CEC Computing

Computers

9th Grade

Pearson 1CP2 - 1.3 - Data Types
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to store whole numbers without a fractional part?

real

Boolean

character

integer

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Python keyword for a Boolean data type?

int

float

bool

str

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a string in Python?

age = 30

weight = 25.5

correct = False

myName = "Alex"

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type would you use to store a single character or symbol in Python?

int

float

bool

str

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are strings enclosed in Python to differentiate them from other data types?

Parentheses ()

Curly braces {}

Single or double quotation marks

Square brackets []

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, how does the interpreter treat 'True', "True", 'False', and "False"?

They are recognized differently when enclosed in single or double quotes.

Only the versions in single quotes are recognized as boolean values.

Regardless of the quotes, they are all treated as boolean values.

When enclosed in double quotes, they are not recognized as boolean values but as strings.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If Daniel writes a Python program to send a birthday invitation 'Happy Birthday!' to Jacob by multiplying the invitation string by 5, what will be the result?

An error is thrown because the operation is not valid.

The string is converted to an integer and then multiplied.

The result is a string 'Happy Birthday!' repeated 5 times.

The operation is ignored and the original string 'Happy Birthday!' is returned.

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?