Year 8 Python -input-output-selection

Year 8 Python -input-output-selection

8th - 9th Grade

20 Qs

quiz-placeholder

Similar activities

Standard Linux Commands

Standard Linux Commands

1st - 10th Grade

20 Qs

Personal Finance 3.01-3.07 Review Quiz

Personal Finance 3.01-3.07 Review Quiz

9th - 12th Grade

20 Qs

Quis Grade 5

Quis Grade 5

9th - 12th Grade

15 Qs

A2 Computing SQL

A2 Computing SQL

8th Grade

17 Qs

CPF 1 - 3

CPF 1 - 3

6th - 8th Grade

15 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

COMPUTER FINAL EXAM

COMPUTER FINAL EXAM

7th - 8th Grade

20 Qs

PH Infromatika kls IX Bab 4, 5, 6

PH Infromatika kls IX Bab 4, 5, 6

9th Grade

20 Qs

Year 8 Python -input-output-selection

Year 8 Python -input-output-selection

Assessment

Quiz

Computers

8th - 9th Grade

Practice Problem

Hard

Created by

Chris Spencer

Used 33+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you give an output to the console in Python? For example, how would you output 'Hello World!'?

print("Hello World!")

output("Hello World!")

Console.WriteLine("Hello World!")

Print("Hello World!")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, how would you get and store an input from the user? For example, an answer to the question 'What is your name?"

print("What is your name?")

name = input()

input("What is your name")

name = "What is your name?"

print("What is your name")

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

If you want to get a whole number as an input from the user, what would you type in the blank? number = ___(input())

Answer explanation

The input() statement in Python will always return a string (text), s if we want a number, we must convert (or cast) it into an integer using the int() statement.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what comparison operator is used for 'not equal to'?

<>

!=

==

#=

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

If you want to check that answer is "A", what would you put in blanks: if answer __ "A":

Answer explanation

In Python, a single = is used to assign a value to a variable (e.g. name = "Bob") and a double equals == is used to check if something is equal to something else as part of an if statement (e.g. if name == "Bob":).

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In an if statement, what will the condition always evaluate to?

Yes or No

True or False

1 or 0

It depends on the condition!

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid name for a variable?

1stName

@name

firstName

first Name

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?