print(), int and input() - Python

print(), int and input() - Python

6th - 8th Grade

11 Qs

quiz-placeholder

Similar activities

Revision Gr2-2025

Revision Gr2-2025

3rd Grade - University

12 Qs

Programs and Variables in Code and Play

Programs and Variables in Code and Play

5th - 9th Grade

7 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

5.3. Запис математичних виразів на мові Python

5.3. Запис математичних виразів на мові Python

8th Grade

13 Qs

Latihan Format Cell

Latihan Format Cell

8th - 9th Grade

10 Qs

Spreadsheets

Spreadsheets

6th - 8th Grade

13 Qs

Kuis 1 - Pengolah Kata

Kuis 1 - Pengolah Kata

7th Grade

10 Qs

แบบทดสอบก่อนเรียน เรื่อง ระบบฐานข้อมูล

แบบทดสอบก่อนเรียน เรื่อง ระบบฐานข้อมูล

6th Grade

15 Qs

print(), int and input() - Python

print(), int and input() - Python

Assessment

Quiz

Computers

6th - 8th Grade

Practice Problem

Hard

Created by

Chris CHA

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...

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is missing from this line of code?

print(Hello world!)

Speech marks!

print("Hello world!")

Capital P!

Print(Hello world!)

Space before brackets!

print (Hello world)

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is wrong with this line of code?

(print "how tall are you?")

Needs another pair of brackets

(print("how tall are you?"))

Remove outside brackets, surround text with brackets instead:

print("how tall are you?")

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What needs correcting in this line of code?

print('Goodbye world!')

Add an extra space after print

print ('Goodbye world!')

Single quotes should be double quotes

print("Goodbye world!")

Remove exclamation mark

print('Goodbye world')

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What needs to be fixed in this line of code?

print(3 + 5 =, 3 + 5)

Remove parentheses

print 3 + 5 =, 3 + 5

Add quotes around text

print("3 + 5 =", 3 + 5)

Remove comma

print(3 + 5 = 3 + 5)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What needs to be added to make num1 a whole number?

num1 = input("Enter an integer")

Wrap the input inside an int() function

num1 = int(input("Enter an integer"))

Clearer text inside the input brackets

num1 = input("Enter an integer - which is a whole number, no decimals!")

6.

FILL IN THE BLANK QUESTION

45 sec • 1 pt

Turn num1 into a whole number

num1 = ____input("Enter an integer"))

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following code print if you type in 7?

num1 = input("Enter an integer")

print("Your number becomes: ", num1 + 10)

Your number becomes 17

Your numbers becomes: 710

TypeError: must be str, not int

Your number becomes: 17

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

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

Already have an account?