6th of October Technological University
[Link] Ali Shalaby
1. Which of the following defines a variable in Python?
A. var name = “[Link]"
B. string name = "[Link]"
C. Name = "[Link]"
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 = '[Link] '
y = 'Ali'
x+y
A. ‘[Link] ’
B. ‘[Link] 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