Search Header Logo

Python

Authored by Sanan Yusibov

others

Used 11+ times

Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which command will display the text 'Hello world!' on the screen?

print(Hello world!)
print "Hello world!"
print("Hello world!")
print = "Hello world!"

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which command will correctly ask the user for their age?

age = input("How old are you?")
age = input(How old are you?)
input("How old are you?") = age
How old are you = input()

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function will convert a number to a string?

int()
str()
ord()
chr()

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of this command? print ("5" + "3")

8
"5" + "3"
"8"
53

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function will convert a string containing only digits into a number?

int()
str()
ord()
chr()

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which decision statement will be triggered if the variable x is less than 20?

if x > 20:
if x <> 20:
if x == 20:
if x < 20:

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

15. Which of these tests whether the variable x is the same as 'Hello'?

x = "Hello"
x != "Hello"
x == "Hello"
x <> "Hello"

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?