Quiz on Python Identifiers
FREE Online Courses: Knowledge Awaits – Click for Free Access!
Quiz Summary
0 of 15 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 15 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
- Current
- Review / Skip
- Answered
- Correct
- Incorrect
-
Question 1 of 15
1. Question
Which of the following is a keyword in Python?
CorrectIncorrect -
Question 2 of 15
2. Question
- Find the coding block that gives an error?
CorrectIncorrect -
Question 3 of 15
3. Question
- What is the error shown on naming a variable without following the rules?
CorrectIncorrect -
Question 4 of 15
4. Question
- Which of the following give the correct way to test if the word “False” is an identifier?
CorrectIncorrect -
Question 5 of 15
5. Question
- Which of the following naming is the correct way to distinguish a private variable ‘password’ in a class?
CorrectIncorrect -
Question 6 of 15
6. Question
- Which module is imported to check if a word is a keyword?
CorrectIncorrect -
Question 7 of 15
7. Question
In the following code, the lines that can give an error are?
Name_1=’a’
mail@1=’abc@mail’
pass=54321
CorrectIncorrect -
Question 8 of 15
8. Question
- Which of the following gives the output as False?
CorrectIncorrect -
Question 9 of 15
9. Question
Find the identifiers in the below code.
var1=4
def fun():
var2=var1*3
if(var2>0):
print(“It is a natural number”)
else:
print(“The number is either 0 or negative”)
CorrectIncorrect -
Question 10 of 15
10. Question
How many of the identifiers in the below code follow the rules?
percentage=74
raise=32
rate=3
final=percentage+raise/rate
CorrectIncorrect -
Question 11 of 15
11. Question
- Which of the following is an invalid identifier?
CorrectIncorrect -
Question 12 of 15
12. Question
Which of the following codes give the output as 4?
a.
num=4
print(num)
b.
num=4
Print(num)
c.
num=4
print(Num)
d.
num=4
print(‘num’)
CorrectIncorrect -
Question 13 of 15
13. Question
Which line in the below code will first give an error?
vowel_1=’a’
Vowel2_=’e’
vowel-3=’i’
4_vowel=’o’
Vowel5=u
CorrectIncorrect -
Question 14 of 15
14. Question
Which of the following codes do not give any error and follow the good practices of naming?
a.
a=3
b=4
s=a+b
print(s)
b.
num1=3
num-2=4
sum=num1+num-2
print(sum)
c.
num1=3
num2=4
sum=a+b
print(Sum)
CorrectIncorrect -
Question 15 of 15
15. Question
Which of the following codes gives an error?
a.
var=3
print(Var)
b.
var=2
print(‘var’)
c.
var=4
print(var)
d.
variable=2
print(variable)
CorrectIncorrect