Search Header Logo

PYTHON REVISION

Authored by Prema Selvam

Computers

11th Grade

Used 1+ times

PYTHON REVISION
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output be from the following code?
print("Hello" + str(2) + "world!")

Hello world! Hello world!
Hello2world!
Hello Hello world! world!
SyntaxError

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print("12"*3)
What would this print?

36
121212
24
12*3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would this out put? print(users[2][1])

error

16

brown

smith

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

30

200

1020

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose a function called add() is defined in a module called adder.py. Which of the following code snippets correctly show how to import and use the add() function? Select all that apply.

import add from adder

result = add(2, 3)

from adder import add

result = add(2, 3)

from adder import add

result = adder.add(2, 3)

import add

result = adder.add(2, 3)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This command will open MyFile = open("MyText.txt")

To read the file

To append to the file

To write to the file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python shell can be in ________________ways

2

3

1

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?