Search Header Logo

python quiz

Authored by CSI-WZ-025 Kavitha .P

Computers

12th Grade

Used 289+ times

python quiz
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 is a correct syntax to output "Hello World" in Python?

echo("Hello World")

echo Hello World

p("Hello World")

print("Hello World")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable with the numeric value 5?

x=int(5)

x="5"

x=5

both option a and c

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to output the type of a variable or object in Python?

print(typeof(x))

print(type(x))

printtype(x)

print(typex)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct syntax to return the first character in a string?

x=sub."Hello"[0]

x="Hello"[0]

x=sub("hello",(0,1)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is python named after

The snake
Television show called Monty Python

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the print function do in python?

It's a variable.
It can input data.
It displays something like a string or integer
It loops the code.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol do you use to make a comment in Python?

@
¬
;
#

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?