Search Header Logo

Python syntax 2

Authored by Albi Smedley

Computers

9th - 12th Grade

Used 3+ times

Python syntax 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would this print:

print("Hello","Hello" + "Hello")

HelloHelloHello

Hello Hello Hello

Hello HelloHello

Hello, HelloHello

2.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Which answers correctly asks the user to type in their name and then saves the answer in to a variable? (2 are correct)

name = input("Type in your name:")

print("Type in your name:")

input()

print("Type in your name:")

input(name)

str(input("Type in your name"))

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

v1 = input()

What data type is stored inside of v1 after this?

integer

float

string

it depends what the user enters

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is it called when you use + to combine strings?

Combining

Stringing

Concatenating

Adding

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function would convert 17.002 to an integer?

str(17.002)

int(17.002)

float(17.002)

type(17.002)

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

age = input()

Fill in the blank to correctly output the sentence:

print("You are " + ________ + " years old")

age

str(age)

int(age)

"age"

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

s = "i love computer SCIENCE"

print(s.title())


What will this output?

i love computer science

I LOVE COMPUTER SCIENCE

I Love Computer Science

i love computer SCIENCE

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?