Search Header Logo

Python Basics 2019

Authored by Martin Molloy

Computers

7th Grade

Used 163+ times

Python Basics 2019
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

49 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 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

20 sec • 1 pt

Which command will correctly ask the user for their age?

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

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which function will convert a number to a string?

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

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

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

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

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

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of these statements means

if the variable x is less than 20?

if x == 20:

if x <> 20:

if x > 20:

if x < 20:

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?