0% found this document useful (0 votes)
28 views5 pages

Python Variable and Output Quiz

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.

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)
28 views5 pages

Python Variable and Output Quiz

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.

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

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

You might also like