PYTHON PROGRAMMING EXAM
Quiz Summary
0 of 26 Questions completed
Questions:
Information
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Results
Results
0 of 26 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- Current
- Review
- Answered
- Correct
- Incorrect
-
Question 1 of 26
1. Question
Question 1
which of the following are not python data types
CorrectIncorrect -
Question 2 of 26
2. Question
Question 2
x=2023
The following converts x into a string, data typeCorrectIncorrect -
Question 3 of 26
3. Question
Question 3
S = ‘{0} is {0} years old.’.format(25, ‘Bob’) .
print(S)
The following will print outCorrectIncorrect -
Question 4 of 26
4. Question
Question 4
txt = “Hello, welcome to my world.”
Which of the following will throw an error?CorrectIncorrect -
Question 5 of 26
5. Question
Question 5
txt = “Company12#”
x = txt.isalnum()
print(x) . The expressionw will return …CorrectIncorrect -
Question 6 of 26
6. Question
Question 6
students1=[“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
]students1[:]
the above line of code willCorrectIncorrect -
Question 7 of 26
7. Question
Question 7
students1=[“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
]students1[::-1]
the above line of code willCorrectIncorrect -
Question 8 of 26
8. Question
Question 8
students1=[“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
]students2=(“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beauty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
)
students2[5]=students1[4]
the above line of code the new value of students2[5] isCorrectIncorrect -
Question 9 of 26
9. Question
Question 9
students1=[“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
]students2=(“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,”Mary Ngozi”,”Funmi Awale”,”Beauty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
)
students2[5]=students1[4]
the above line of code the new value of students2[5] isCorrectIncorrect -
Question 10 of 26
10. Question
Question 10
students3={“Bello Sanni”,”Wale Adams”,
“Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”,
“Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”
}
x = list(students3)
what data type is x?CorrectIncorrect -
Question 11 of 26
11. Question
Question 11
n1=[“Bello Sanni”,”Wale Adams”,”Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”
“Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”]n2=(“Simi2 Anibaba”,”Yele2,Bello”,”Tunde2 Mikels”)
for y in n2:
n1.append(y)In the above ,the loop adds ech item in names2 to names1
what is result of the following code ?n2[1] == n1[12]
CorrectIncorrect -
Question 12 of 26
12. Question
Question 12
names1=[“Bello Sanni”,”Wale Adams”,”Jamiu Adeleye”,”Mathew Osundu”,”Tunde Mikels”,”John Ochugbo”
“Mary Ngozi”,”Funmi Awale”,”Beuty Bella”,”Yemisi Adeleke”,”Bunmi Esho”]names2=[“Simi2 Anibaba”,”Yele2,Bello”,”Tunde2 Mikels”]
for y in names2:
names1.append(y)In the above ,the loop adds ech item in names2 to names1
what is result of the following code ?print (xx[1] === st1[12] )
CorrectIncorrect -
Question 13 of 26
13. Question
Question 13
a = [1, 2]
b = [3, 4]
a[len(a):] = b . the new value of a isCorrectIncorrect -
Question 14 of 26
14. Question
Question 14
def fill(*args):
return sum(args) fill(1,2,3,4,5). Which is the correct result ?CorrectIncorrect -
Question 15 of 26
15. Question
Question 15
list1 = []
# Index ranges from 1 to 10 to multiply
for i in range(1, x ):
list1.append(4*i)WHAT IS THE POSSIBLE VALUE OF X
print(list1) result is [4, 8, 12, 16, 20, 24, 28, 32, 36, 40]
CorrectIncorrect -
Question 16 of 26
16. Question
Question 16
list2 = []
for i in range(0,y):
list2.append(list1[i]%5==0)
print(list2)
WHAT IS THE POSSIBLE VALUE OF Y ?
[False, False, False, False, True, False, False, False, False, True]CorrectIncorrect -
Question 17 of 26
17. Question
Question 17
ist1 = []
# Index ranges from 1 to 10
for i in range(1, x ):
list1.append(4*i)
WHAT IS THE POSSIBLE VALUE OF X
print(list1)
result is [4, 8, 12, 16, 20, 24, 28, 32, 36, 40]ist1 = []
# Index ranges from 1 to 10
for i in range(1, x ):
list1.append(4*i)
WHAT IS THE POSSIBLE VALUE OF X
print(list1)
result is [4, 8, 12, 16, 20, 24, 28, 32, 36, 40]CorrectIncorrect -
Question 18 of 26
18. Question
Question 18
def exel():
a=1
b=4
c=a*b
exel.d=a*b
print(exel.d)msg=”the result is : “
exel.msg=”the function message: result is : “WHICH OF THE FOLLOWING WILL PRINT OUT THE RESULT OF THE FUNCTION
CorrectIncorrect -
Question 19 of 26
19. Question
Question 19
“Flask webapplication setup
Virtualenv appenv
Cd appenv
….FILL…
Pip install flaskThe steps above are required to setup a virtual environment and install flask
Which of the following best completes the process
“
CorrectIncorrect -
Question 20 of 26
20. Question
Question 20
Class Products(db.model):
name=db.column(db.string(100))
email=db.column(db.string(100))in flask app the above code can used to :
CorrectIncorrect -
Question 21 of 26
21. Question
Question 21
Class Products(db.model):
name=db.column(db.string(100))
email=db.column(db.string(100))the above code is used in a flask app which of the following can be said is true :
CorrectIncorrect -
Question 22 of 26
22. Question
Question 22
In OOP inheritance means
CorrectIncorrect -
Question 23 of 26
23. Question
Question 23
In OOP encapsulation means
CorrectIncorrect -
Question 24 of 26
24. Question
Question 24
A=1000
A+=10 ; A+=10 ; A+=10
Print(A)
What will be the value of ACorrectIncorrect -
Question 25 of 26
25. Question
Question 25
x=2023
Which of the following converts x into a string, data typeCorrectIncorrect -
Question 26 of 26
26. Question
Question 26
Which of the following will run with error
CorrectIncorrect