0% found this document useful (0 votes)
19 views2 pages

Quiz2-Model Answer B Python

The document is a Quiz2 exam for the Essential Programming in Python course at October Technological University, covering various programming concepts. It includes multiple-choice questions and true/false statements related to Python programming. The exam is designed for first-year Information Technology students and has a total of 15 marks.

Uploaded by

malakmahamad376
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Quiz2-Model Answer B Python

The document is a Quiz2 exam for the Essential Programming in Python course at October Technological University, covering various programming concepts. It includes multiple-choice questions and true/false statements related to Python programming. The exam is designed for first-year Information Technology students and has a total of 15 marks.

Uploaded by

malakmahamad376
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Faculty of Industry and Energy Technology Quiz2 Exam October Technological University

Model B
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) 23456 B) 2345 C) 123456 D) 23

2.
A) 12345678910 B) 14710 C) 147 D) 1369
3. Which of the following is not a core data type in Python programming?
A) Tuples B) Lists C) Class D) Dictionary
4. Which of the following types of loops are not supported in Python?
A) for B) while C) do-while D) None
5. Which of the following is a valid for loop in Python?
A) for (i=0; i < n; i++) B) for i in range(0,5):
C) for i in range(0,5) D) for i in range(5)
6. A loop becomes infinite loop if a condition never becomes ________.
A) TRUE B) FALSE C) Null D) Both A and C
7. If the else statement is used with a while loop, the else statement is executed when the condition
becomes _______.
A) TRUE B) FALSE C) Infinite D) Null
8. Choose the correct option with respect to Python.
A) Tuples are immutable while lists are mutable. B) Both tuples and lists are immutable
C) Tuples are mutable while lists are immutable D) Both tuples and lists are mutable

9.

1
Faculty of Industry and Energy Technology Quiz2 Exam October Technological University
Model B
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: ------------------------------------------------

A) 123 B) 12345 C) 123456 D) 1245

10.
A) No Output B) a b c d e f C) abcdef D) i i i i i.....

Question 2: True or false (5 marks)


1. Tuples cannot be declared with a single element unless followed by a comma ( T)
2. With the break statement we can stop the loop even if the while condition is true (T )
3. With the continue statement we can jump the current iteration, and continue with the next (T )
4. lists items are enclosed in square brackets (T )

You might also like