Codeforlife python worksheet 1 - Output, Operators and Data

Quiz
•
Computers
•
8th Grade
•
Hard
I Robinson
FREE Resource
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's wrong with this line of code?
PRINT("Hello world")
Nothing
Missing round bracket
print is in uppercase
Missing quotation mark
Answer explanation
The issue with the code is that 'PRINT' is in uppercase. In Python, function names are case-sensitive, so it should be 'print' in lowercase to work correctly.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's wrong with this line of code?
print("Hello world")
Nothing
Missing round bracket
print is in uppercase
Missing quotation mark
Answer explanation
The line of code 'print("Hello world")' is correct as it properly uses the print function with the correct syntax. There are no missing brackets, uppercase issues, or missing quotation marks. Thus, the answer is 'Nothing'.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's wrong with this line of code?
print("Hello world)
Nothing
Missing round bracket
print is in uppercase
Missing quotation mark
Answer explanation
The code is missing a closing quotation mark after 'Hello world'. This causes a syntax error, making 'Missing quotation mark' the correct choice.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What's wrong with this line of code?
print("Hello world"
Nothing
Missing round bracket
print is in uppercase
Missing quotation mark
Answer explanation
The line of code is missing a closing round bracket for the print function. It should be print("Hello world"). This is the reason for the error, making 'Missing round bracket' the correct choice.
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Which symbol (character) do we use to ADD two numbers together in python?
Answer explanation
In Python, the symbol used to add two numbers together is the plus sign (+). This operator performs addition when placed between two numeric values.
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Which symbol (character) do we use to SUBTRACT two numbers together in python?
Answer explanation
In Python, the symbol used to subtract two numbers is the minus sign (-). For example, to subtract 5 from 10, you would write '10 - 5', which evaluates to 5.
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Which symbol (character) do we use to DIVIDE two numbers together in python?
Answer explanation
In Python, the symbol used to divide two numbers is the forward slash (/). This operator performs floating-point division, returning a decimal result when applicable.
Create a free account and access millions of resources
Similar Resources on Wayground
27 questions
Python 2d topic (типы данных, ввод, вывод)

Quiz
•
6th - 12th Grade
24 questions
S3 Python datatypes and variables

Quiz
•
8th - 10th Grade
25 questions
8th Grade (Programming B)

Quiz
•
8th - 12th Grade
25 questions
Python for Absolute Beginners

Quiz
•
8th - 12th Grade
25 questions
SUMATIF TENGAH SEMESTER INFORMATIKA KELAS 8

Quiz
•
8th Grade
30 questions
Python L1 Programming Challenge

Quiz
•
1st - 12th Grade
24 questions
LocoRobo Python Coding

Quiz
•
6th - 8th Grade
30 questions
EOT Revision Programming and Algorithms

Quiz
•
8th - 10th 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