Python basic interactions

Python basic interactions

9th Grade

28 Qs

quiz-placeholder

Similar activities

Python 4 🐍 incomplete

Python 4 🐍 incomplete

9th Grade

25 Qs

Python Review

Python Review

9th Grade

24 Qs

What i lerned in cumputer science

What i lerned in cumputer science

8th - 12th Grade

25 Qs

2.2.1a Variables & Types

2.2.1a Variables & Types

9th - 12th Grade

25 Qs

Python Programming End of Unit Assessment

Python Programming End of Unit Assessment

7th - 9th Grade

30 Qs

Coding

Coding

7th - 9th Grade

30 Qs

Python Beginner

Python Beginner

6th - 12th Grade

30 Qs

Python Loops

Python Loops

9th - 12th Grade

27 Qs

Python basic interactions

Python basic interactions

Assessment

Quiz

Computers

9th Grade

Medium

Created by

Sarbagya Malla

Used 14+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?