N5 - Python Recap

N5 - Python Recap

11th Grade

•

28 Qs

quiz-placeholder

Similar activities

Fourth Grade March Rivision

Fourth Grade March Rivision

4th Grade - University

•

24 Qs

Excel m3

Excel m3

3rd - 12th Grade

•

26 Qs

4Inf_Java_base

4Inf_Java_base

11th Grade

•

25 Qs

ÔN TẬP KIỂM TRA THƯỜNG XUYÊN KỲ 2

ÔN TẬP KIỂM TRA THƯỜNG XUYÊN KỲ 2

11th Grade

•

26 Qs

Revision hardware, Input,Output,Main Memory, Storage, Processing

Revision hardware, Input,Output,Main Memory, Storage, Processing

11th Grade

•

25 Qs

OCR L3 ICT - U1 Ethical & Operational Issues - Threats

OCR L3 ICT - U1 Ethical & Operational Issues - Threats

10th - 12th Grade

•

23 Qs

PTS Informatika Kelas XI: Desain Grafis

PTS Informatika Kelas XI: Desain Grafis

11th Grade

•

25 Qs

Six Weeks Test 5th Form

Six Weeks Test 5th Form

11th Grade

•

23 Qs

N5 - Python Recap

N5 - Python Recap

Assessment

Quiz

•

Computers

•

11th Grade

•

Practice Problem

•

Hard

Created by

S Johnston

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does input("Enter your name: ") do?

Displays your name

Prints a message

Asks the user for input

Creates a variable

Answer explanation

The function input("Enter your name: ") prompts the user to enter their name, effectively asking for input. It does not display or print anything by itself, nor does it create a variable directly.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line outputs a message to the screen?

input("Message")

print("Message")

message = "Message"

display("Message")

Answer explanation

The correct choice is 'print("Message")' because it is the function used in Python to output messages to the screen. The other options do not display messages: 'input' takes input, assignment does not output, and 'display' is not a standard function.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of: print("Hello" + "World")

Hello + World

Hello World

HelloWorld

Error

Answer explanation

The expression 'Hello' + 'World' concatenates the two strings without any space, resulting in 'HelloWorld'. Therefore, the correct output is 'HelloWorld'.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is wrong with this line? print("Your age is " + age)

Nothing

It needs int(age)

It needs str(age)

The + is incorrect

Answer explanation

The line is incorrect because 'age' is likely an integer. To concatenate it with a string, it needs to be converted to a string using str(age). Thus, the correct choice is 'It needs str(age)'. This allows proper string concatenation.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which input line saves the response in a variable?

print("Enter your name")

input("Enter your name")

name = input("Enter your name: ")

response = print("Enter name: ")

Answer explanation

The correct choice is 'name = input("Enter your name: ")' because it assigns the user's input to the variable 'name'. The other options either do not save the input or use incorrect syntax.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line assigns the value 12 to a variable?

12 = age

age == 12

age = 12

assign age 12

Answer explanation

The correct line is 'age = 12', which uses the assignment operator '=' to assign the value 12 to the variable 'age'. The other options either use incorrect syntax or do not perform an assignment.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a string?

"17"

17

True

17.0

Answer explanation

The correct choice is "17" because it is enclosed in quotes, making it a string. The other options are either numbers or a boolean, which are not strings.

Create a free account and access millions of resources

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?