Search Header Logo

python basics

Authored by Filzah Amjad

Information Technology (IT)

9th - 12th Grade

Used 2+ times

python basics
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 symbol is used in python to assign values to a variable?

equals =
plus + 
forward slash /
asterisk *

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the following code, "city" is an example of a what?

List
Loop
Variable
Array

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

x = 5

y = 6

print(x*y)


The code above displays the following:

11

x*y

Syntax Error

30

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? myAge = int (myAge)

Converts the var (variable) myAge to a string

Converts the var (variable) myAge to a integer

Converts the var (variable) myAge from a integer to a string

Converts the var (variable) myAge to if statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

TypeError
Hello world world!
Hello world!Hello world!
Hello world! * 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

people = ["John", "Rob", "Bob"]

print (people[-1])

what would this result be?

John
Rob
Bob

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of program below?


mariana_islands = ['Saipan', 'Tinian', 'Rota']

mariana_islands.remove('Tinian')

print(mariana_islands)

['Saipan', 'Tinian', 'Rota']

['Tinian', 'Rota']

['Saipan', 'Tinian']

['Saipan', 'Rota']

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?