IT1X54 Programming Essentials Week 1
Quiz
•
Professional Development
•
12th Grade
•
Practice Problem
•
Medium
Bobby Liu
Used 2+ times
FREE Resource
Enhance your content in a minute
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following are considered input devices?
Keyboard
Mouse
Monitor
Touchscreen
Answer explanation
Input Devices collects data for the processing by the computer. The input device can be a keyboard, a mouse, a microphone or a touchscreen.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What handles arithmetic and logical operations in the CPU?
Control Unit
Registers
Arithmetic Logic Unit
Main Memory
Answer explanation
Control Unit: extracts instructions from memory and decodes and executes them
Arithmetic Logic Unit (ALU): handles arithmetic and logical operations
Registers are internal memory units that are used in the ALU's information processing.
Main Memory stores data and instruction in the computer. The computer can only manipulate data that is in main memory.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Are data stored in secondary storage devices wiped out after power supply is cut off?
No
Yes
Answer explanation
Secondary Storage stores data for a long period of time even if there is no power supply. Examples are hard disks and thumb drives.
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are features of Python?
Light-weight
Dynamically typed
Object-oriented
Easily integrated with C/C++
REPL (Read-eval-print-loop)
Answer explanation
Light-weight: Lightweight programming languages have simple syntax so they could be learnt easily and quickly. They required small memory and is easy to implement.
Dynamically typed: A language is dynamically-typed if the type of a variable is checked during run-time. We will learn more about this in the later chapters. Besides Python, common examples includes JavaScript, PHP, and Ruby.
Object-oriented: Object-oriented programming languages use the concept of objects in programming. This is very close to how we view the real-world. For example, to record book information (such as isbn, author, and title), object-oriented programming creates book objects and store the information in each object. The aim is to bind together the data and the codes that operate on them so that no other part of the program can change the data.
Easily integrated with C/C++: As there are many systems implemented using C/C++, this is a important feature in Python.
REPL (Read–eval–print-loop): Python is an interpreted language and we can run simple Python expressions and statements in an interactive programming environment. After you installed Python, you can open a Python Shell by typing "Python" in the Windows search box.
5.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
What is a compiler and and an interpreter?
A compiler compiles codes into machine language before running while an interpreter runs the source code directly
A compiler runs the source code directly while an interpreter compiles codes into machine language before running
Answer explanation
A compiler is used to translate the high-level language programs to a machine language programs.
The interpreter reads each instructions, converts it to machine language instruction and immediately executes it.
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which are the 3 type of errors you would find in programming?
Interpreter error
Syntax error
Semantic (logic) error
Runtime error
Compiler error
Answer explanation
Syntax errors are mistakes in the way that the code is written. Common syntax errors include spelling mistakes, incorrect use of punctuation and wrong indentation.
Example:
prin("Good Morning")
Runtime errors cause the program or computer to crash even if it appears to be nothing wrong with the program code. Running out of memory or wrong type conversion will often cause a runtime error.
Example:
x = int(input("Enter a number: "))
Enter a number : a
Traceback (most recent call last):
ValueError: invalid literal for int() with base 10: 'a'
The runtime error occurs at the line when the character ‘a’ is being converted to an integer. Program crashes and exit immediately.
Semantic errors, or logic errors, happen when the program produces different results from what we have expected. Program with semantic errors will execute without any errors being reported.
Example:
x = int(input("Enter the first number : ")) y = int(input("Enter the second number : "))
print("The sum is", x*y)
Enter the first number : 3 Enter the second number : 5 The sum is 15
Semantic or logic error occurred when the output of the program is incorrect.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
App Design Adventure
Quiz
•
4th Grade - University
10 questions
United States Coast Guard Ratings Quiz
Quiz
•
12th Grade
10 questions
Computing Systems
Quiz
•
9th Grade - Professio...
10 questions
Effective Problem Solving Strategies
Quiz
•
12th Grade
5 questions
Quiz sobre Población, Muestra y Muestreo
Quiz
•
12th Grade - University
10 questions
01-JavaScriptAvanzado-I
Quiz
•
1st - 12th Grade
10 questions
OPSWA Code of Conduct Quiz
Quiz
•
12th Grade
10 questions
GOVERNMENT 5101
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Professional Development
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
11 questions
Exponent Quotient Rules A1 U7
Quiz
•
9th - 12th Grade
