Week 1 QUIZ

Quiz
•
Other
•
University
•
Medium
Vidhi Saxena
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does df.groupby('Department').mean() do?
Groups rows by Department and shows row count
Filters only numeric columns
Groups data by Department and calculates mean of each group
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you filter rows where column Age > 30 in a DataFrame df?
df[df['Age'] > 30]
df['Age'] > 30
df.select('Age' > 30)
df.filter(Age > 30)
3.
FILL IN THE BLANK QUESTION
1 min • 1 pt
command returns the shape of an array arr
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is list comprehension equivalent of:
[i*i for i in range(5)]
[i*i if i in range(5)]
(i*i for i in range(5))
map(lambda i: i*i, range(5))
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
function returns evenly spaced numbers in given range inclusive of both.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def extendList(val, lst=[]):
lst.append(val)
return lst
list1 = extendList(10)
list2 = extendList(123, [])
list3 = extendList('a')
print(list1)
print(list2)
print(list3)
[10], [123], ['a']
[10, 'a'], [123], [10, 'a']
[10, 'a'], [123], ['a']
[10], [123], [10, 'a']
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
a = [1, 2, 3]
b = a
a += [4, 5]
print(a)
print(b)
[1,2,3,4,5], [1,2,3]
[1,2,3,4,5], [1,2,3,4,5]
[1,2,3], [1,2,3]
Error
Create a free account and access millions of resources
Similar Resources on Wayground
18 questions
MIDTERM EXAM

Quiz
•
University
22 questions
Funções e Estruturas em Programação C - Parte I

Quiz
•
9th Grade - Professio...
20 questions
Soal Dasar Pemrograman Dan Algoritma

Quiz
•
10th Grade - University
25 questions
ISST306 | Quiz 1

Quiz
•
University
20 questions
Programming Fundamentals

Quiz
•
KG - University
20 questions
Intervalos

Quiz
•
University
21 questions
Python QCM

Quiz
•
University
25 questions
Excel

Quiz
•
12th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade
Discover more resources for Other
36 questions
USCB Policies and Procedures

Quiz
•
University
4 questions
Benefits of Saving

Quiz
•
5th Grade - University
20 questions
Disney Trivia

Quiz
•
University
2 questions
Pronouncing Names Correctly

Quiz
•
University
15 questions
Parts of Speech

Quiz
•
1st Grade - University
1 questions
Savings Questionnaire

Quiz
•
6th Grade - Professio...
26 questions
Parent Functions

Quiz
•
9th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University