Search Header Logo

Python basic interactions

Authored by Sarbagya Malla

Computers

9th Grade

Used 14+ times

Python basic interactions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following Python program print?
x = 9 + 6 / 3 * 2 - 1
print(x)

9

12

11

21

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct declaration of a float variable with the value 3.14.

myFloat = int(3.14);

myFloat = 3;

pi= 3.14

myFloat = (int)3.14159;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following choices is NOT a Python variable type?

string
boolean

pineapple

float

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following program print?
a = "hi"
b = 4
c = a * b
print(type(c))


The program crashes and doesn’t print anything.


<type 'float'>


<type 'int'>


<type 'str'>

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose you have a variable defined a = "4". What is the variable type of a?

string
float
integer
boolean

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What kind of data does a float variable contain?

Whole numbers
Decimal numbers
Text strings
Boolean values

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code print?
x = 3.4

y = 1
print(int(x))
print(x + y)

3 4.4
3.4 4.4
3 4.5

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?