IT1X54 Programming Essentials Week 1

Quiz
•
Professional Development
•
12th Grade
•
Medium

Bobby Liu
Used 2+ times
FREE Resource
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.
Similar Resources on Wayground
10 questions
Thinking fast and slow

Quiz
•
12th Grade
5 questions
REFUERZO NAGRA 2

Quiz
•
1st - 12th Grade
10 questions
Training Guidelines Quiz

Quiz
•
12th Grade
10 questions
Evaluasi K3

Quiz
•
9th - 12th Grade
10 questions
EVALUACIÓN QUIMESTRAL 12B ÉTICA

Quiz
•
12th Grade
10 questions
Chapter 3 What your employer expects

Quiz
•
12th Grade
10 questions
Surprize Quiz - I

Quiz
•
12th Grade
10 questions
Computers & Accounting Systems

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

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Professional Development
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade