Font size
WorksheetsProgramming - Output
Total questions: 12
Worksheet time: 7mins
What will the following code print:
print("hellworld")
hellworld
helloworld
you will get a syntax error
Null (nothing)
What will the following code output?
print("james\nbond")
james\nbond
james
bond
jamesbond
syntax error
What will the following code output?
print("hello"world)
syntax error
hello"world
helloworld
hello
"Breaks down a goal or problem into smaller and manageable solutions or tasks".
What programming construct does this describe?
Abstraction
Decomposition
Pattern Recognition
Algorithm
What is an algorithm?
Select the description that defines algorithm the most accurately.
An algorithm is a list of rules to follow in order to solve a problem.
An algorithm is a variable type used in high-level languages.
An algorithm is a low-level programming language.
An algorithm is a type of pattern recognition technique to fix hardware.
Python is a low-level programming language.
True
False
What symbol do we need to use in Python to add comments in our program?
/
\
*
#
@
What will the following code output?
print("error")
error
syntax error
eror
printerror
There are two ducks in front of a duck, two ducks behind a duck and a duck in the middle. How many ducks are there?
One
Two
Three
Four
What will the following code output?
Print("first/nprogram")
first/nprogram
first
program
syntax error
firstprogram
What do we mean by syntax?
A set of rules to follow for programming languages.
A variable type standard.
A string of text we can use in Python.
A function we can use to output text.
Type the code to output the EXACT string of text:
ComputerScience2022
(a)
