The document contains a series of multiple-choice questions related to Python programming, covering topics such as variable definitions, data types, string operations, and list membership. It includes questions about the output of specific code snippets and the characteristics of Python. Additionally, it addresses concepts like case sensitivity and reserved keywords in Python.
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 ratings0% found this document useful (0 votes)
2 views5 pages
Quiz 1 Model A python -Model Answer
The document contains a series of multiple-choice questions related to Python programming, covering topics such as variable definitions, data types, string operations, and list membership. It includes questions about the output of specific code snippets and the characteristics of Python. Additionally, it addresses concepts like case sensitivity and reserved keywords in Python.
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/ 5
6th of October Technological University
Dr.Yasmeen Ali Shalaby
1. Which of the following defines a variable in Python? A. var name = “dr.Yasmeen" B. string name = "dr.Yasmeen" C. Name = "dr.Yasmeen" D. All of the above
2. What is the output of the following code?
x = 100 type(x) A. integer B. int C. <class ' int'> D. <class 'number'>
3. What is the output of the following code?
x = 'dr.Yasmeen ' y = 'Ali' x+y A. ‘dr.Yasmeen ’ B. ‘dr.Yasmeen Ali’ C. ‘Ali’ D. error 4. How to get the type of the following variable? i = 100 A. type(i) B. exec(i) C. print(i) D. help(i)
5. If lst = [[1, 2],[3, 4]] , which of the following will result true? A. 3 in lst B. [3, 4] not in lst C. 3 in lst[1]
6. What is the output of word = "Yasmeen"
print(word * 2) A. Yasmeen B. YasmeenYasmeen C. yasmeenyasmeen D. Error 7. What is the output of print("Yasmeen" + 'Ali') A. Yasmeen + Ali B. YasmeenAli C. yasmeen ali D. error
1. What is the result of print(type([]) is list? True
2. Python is not case-sensitivity. False 3. Reserved keywords are words that cannot use as variable names. True Best Wishes