Year 8 Python -input-output-selection

Quiz
•
Computers
•
8th - 9th Grade
•
Hard
Chris Spencer
Used 30+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
8.4 Algorithm Test

Quiz
•
9th Grade
17 questions
Unit 1 Quiz Programming 23-24

Quiz
•
9th Grade
15 questions
if-else-if and Logical Operators

Quiz
•
9th - 12th Grade
18 questions
CS1 Unit 8 Review

Quiz
•
9th - 12th Grade
20 questions
AQA GCSE Computer Science -3.1.1 Representing algorithms

Quiz
•
8th - 10th Grade
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
20 questions
Python Lists and Strings

Quiz
•
9th Grade
15 questions
Code.org Unit 5 Lesson 15 Assessment

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade