Faculty of Industry and Energy Technology Quiz2 Exam October Technological University
Model A
Subject : Essential Programming in Python (ICT103) Date : 4 / 12 / 2023
Time allowed: 15 min 1st year Program : : Information Technology
Examiners Committee: Dr. Yasmeen Ali Shalaby Total marks: 15
Name: ------------------------------------------------------------------------------------ ID: ------------------------------------------------
Q1. Select the answer for the next questions: (10 marks)
What will be the output of the following Python code?
1.
A) b is greater than a B) a and b are equal C) a is greater than b D) error
2.
A) [1,2] B) Error C) [1,2,1,2,1,2] D) [(1,2)*3]
3.
A) 123 B) 1234567 C) 1245678 D) 124567
4.
A) ['Sunday', 'Monday', 'Tuesday'] B) ['Sunday', 'Monday', 'Wednesday']
C) ['Sunday', 'Monday', 'Tuesday', 'Wednesday'] D) ['Monday', 'Tuesday', 'Wednesday']
5. In python which of the following operator is used after condition of if statement?
A) Dot (.) B) Semicolon (;) C) Comma (,) D) Colon (:)
1
Faculty of Industry and Energy Technology Quiz2 Exam October Technological University
Model A
Subject : Essential Programming in Python (ICT103) Date : 4 / 12 / 2023
Time allowed: 15 min 1st year Program : : Information Technology
Examiners Committee: Dr. Yasmeen Ali Shalaby Total marks: 15
Name: ------------------------------------------------------------------------------------ ID: ------------------------------------------------
6.
A) 1 2 B) 12 C) Error D) None
7. Which of the following evaluates to True when a is equal to b or when a is equal to 5?
A) a == b or a == 5 B) a = b or a = 5 C) a = b and a = 5 D) a == b and a = 5
8.
A) error B) The negative number -10 is not valid here
This is always printed
C) This is always printed D) The negative number -10 is not valid here
9.
A) TRUE B) TRUE C) FALSE D) TRUE
FALSE TRUE FALSE
TRUE
10.Which of the following is not a core data type in Python programming?
A) Tuples B) Lists C) Class D) Dictionary
Question 2: True or false (5 marks)
1) Lists items are enclosed in square brackets ( T )
2) Lists are immutable, you cannot add or edit ( F )
3) Tuples can have different data types ( T )
4) Tuples are enclosed in parentheses ( T )
5) Tuples are mutable, you can add or edit ( F )