Python Session 5

Quiz
•
Computers
•
Professional Development
•
Medium
Hasan Bhagat
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What error occurs when you try to access a column which is not there in a pandas dataframe
ValueError
IndexError
KeyError
SyntaxError
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is not an Error type in python?
KeyError
IdeaError
ImportError
SyntaxError
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid variable name in python
df1
_var1_
@var
data_type
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a python reserved keyword
False
false
FALSE
F
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Consider a list X having 5 elements.
X= ['Apple','Tomato','Cat','Bag','Mouse'].
What would X[5] return?
Mouse
Raise an IndexError
[]
Empty list
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the use of the input() function to input the age of a user. We want to check if the age is above 18 or not.
age= input('Enter age:')
if age>18:
print("Permitted")
else:
print("Not Permitted")
What will happen if the input is "24".
Permitted
Not Permitted
TypeError
24
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a reason for using exception handling?
Error reporting and logging
Makes the code robust
Separates the error prone code from other code
Debugging
All of the above
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
FP2: 02 - STRINGS

Quiz
•
Professional Development
13 questions
Python Final Quiz

Quiz
•
Professional Development
15 questions
Python Class 1

Quiz
•
Professional Development
10 questions
Day 3

Quiz
•
Professional Development
10 questions
PreTrainingExceptions

Quiz
•
Professional Development
10 questions
Python Basics

Quiz
•
Professional Development
10 questions
PBO

Quiz
•
Professional Development
11 questions
JAVA QUIZ

Quiz
•
Professional Development
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade