Introduction To Computing and Information Technology 2 Mid-Term Examination Makeup
Introduction To Computing and Information Technology 2 Mid-Term Examination Makeup
TM112
Mid-term Examination
Makeup
Spring Semester
2018-2019
Solution
Instructions:
1. Write the answers on the separate answer booklet
2. Total marks: 60 marks
3. The exam consists of three parts:
A. MCQ Questions (10 marks): You should answer all questions.
B. Short-Answer Questions (20 marks): You should answer all questions.
C. Programming/Problem Solving Questions (30 marks): You should answer all questions.
4. The use of calculators is not allowed
TM112 Midterm-Exam- Makeup Spring 2018-2019
Answer all the following questions by choosing the most correct statement.
You should dedicate approximately 10 minutes for this part.
1- Data should be moved into _____ from main memory before it is needed by the processor:
a- ROM c- Hard Disk
b- ALU d- Cache memory
2- If a memory loses its content when the power is switched off, then we call it:
a. Non-volatile c. Volatile.
b. ROM. d. Both b and c
4- The register within the ALU where calculations take place is sometimes referred to as the:
5- The task of converting the source code into machine language is carried out by special
programs called?
a- Assemblers c- Translators.
b- Compilers d- Machine Language.
This part consists of 4 questions. You must attempt all questions. You should dedicate
Question 1: [5 marks]
a- Assembly language
b- Virtualisation
2/6
TM112 Midterm-Exam - Makeup Spring 2018-2019
instructions and symbolic addresses that translate into machine language instructions on a
one-to-one basis.
Question 2: [5 marks]
• Management of memory
Question 3: [5 marks]
total = 0
for index in range(1, 5):
print( total + index)
total= total + index
print(total)
3/6
TM112 Midterm-Exam - Makeup Spring 2018-2019
Question 4: [5 marks]
Answer: (5 marks)
a- (2.5 marks: 1.5 marks for the result, 1 mark for showing the steps): 51
b- (2.5 marks: 1.5 marks for the result, 1 mark for showing the steps): 1101001
This part consists of 3 questions. You must attempt all questions. You should dedicate
approximately 60 minutes for this part.
Question 1: [10 marks]
4/6
TM112 Midterm-Exam - Makeup Spring 2018-2019
Answer:
MTA = float(input("Enter the MTA grade: "))
TMA = float(input("Enter the TMA grade: "))
total=MTA+TMA
if total<15:
print(total ,': The student failed the course!')
else:
print(total,': The student is qualified to sit for the final exam')
Design the algorithm and implement a program that draws a rectangle with a width=50 and with a
height =25, using the turtle.
N.B: You should use a loop in your work.
Answer: (4+6)
The algorithm will be as follows:
>> Draw a rectangle
For sides from 1 to 2
Draw a line of length 50 units
Turn right by 90 degrees
Draw a line of length 25 units
Turn right by 90 degrees
Implementation in Python:
# Draw a rectangle
from turtle import *
for sides in range(2):
forward(50)
right(90)
forward(25)
right(90)
5/6
TM112 Midterm-Exam - Makeup Spring 2018-2019
A simple use of the if, elif, and else statements is to assign letter grades for the scores.
Answer: (students’ answers may vary, please consider any valid answer)
a- (2 marks):
grade= eval (input (‘Enter your numeric grade’))
b- (6 marks):
c- (2 marks):
for i in range(100):
_____________________________________________________________________________
End of Questions
6/6