Which of the following statements about Python functions are correct? (Choose two.)
AFunctions can only return numeric values or strings.
BPositional arguments must be passed in the order defined, while keyword arguments can be passed in any order using their parameter names.
CA function cannot call itself or be passed as an argument to itself.
Dpass executes the function body and returns its result.
EIf a function does not contain a return statement, it returns None by default.
FDefault parameters must always come before required ones in the parameter list.
0
Question 2
Introduction to Data and Data Analysis Concepts
0
Question 3
Communicating Insights and Reporting
0
Question 4
Introduction to Data and Data Analysis Concepts
0
Question 5
Python Basics for Data Analysis
0
That's the end of the Preview
This exam has 30 community-verified practice questions. Create a free account to access all questions, comments, and explanations.
Topics covered:
Introduction to Data and Data Analysis ConceptsPython Basics for Data AnalysisWorking with Data and Performing Simple AnalysesCommunicating Insights and Reporting
A government agency collects citizen data for various public services.
What is the primary reason for emphasizing careful data management throughout the entire data lifecycle in this context? Select the best answer.
ATo enable seamless sharing of anonymized citizen information with other governmental bodies for collaborative initiatives.
BTo guarantee the long-term availability and integrity of crucial citizen datasets for future policy formulation and evaluation.
CTo uphold data quality for effective service delivery, safeguard citizen privacy and prevent misuse, and comply with data protection laws.
DTo streamline the initial capture of citizen details and minimize the administrative burden on both staff and the public.
You are creating a presentation slide to communicate findings about student stress levels across four categories over a six-month period. You include the following line graph in your presentation:
Your goal is to help your audience clearly understand trends in stress levels over time.
What is the highest problem with this visual presentation? Select the best answer.
AThe graph doesn't explain what each stress level means or show exact values for each month, which limits interpretation.
BThe lines are too light and similar in color, making it difficult to distinguish between trends.
CThe font used in the chart is hard to read; using larger, uppercase text would improve clarity.
DThe chart should be in 3D format to show depth and highlight differences more clearly.
EThe months should be replaced with week numbers to provide more detailed insight.
A financial technology company is reviewing its data practices to ensure legal and ethical compliance.
Which of the following actions would support responsible data handling and align with regulations like GDPR, HIPAA, and CCPA? (Choose two.)
ALimiting data access only to marketing staff to streamline personalization.
BImplementing encryption for both stored and transmitted customer data.
CAutomatically opting users into data sharing unless they manually change settings.
DProviding users with a clear explanation of how their data is used and obtaining explicit consent.
ERetaining user data permanently unless users explicitly request deletion.
You are developing a temperature control module for a laboratory incubator. Your objectives are to: generate timestamps every 10 minutes over a 3-hour span (i.e., 0 to 180 minutes), and simulate five evenly spaced target temperatures between 35.0°C and 37.0°C for system calibration.
Which code snippet correctly produces both sequences using NumPy? Select the best answer.
Below are six possible summaries for your presentation:
Summary 1: "The data revealed a moderate positive correlation between age and recycling frequency. While 72% of students reported recycling paper regularly, only 39% reported recycling plastic."
Summary 2: "Analysis showed notable differences in recycling habits by material type, with paper being most recycled and plastic least recycled."
Summary 3: "Older kids recycled more than younger ones. Paper was the most recycled item—plastic got forgotten a lot."
Summary 4: "Student responses showed positive environmental habits overall, though participation varied by waste type."
Summary 5: "A lot of students said they recycle. Some didn't answer every question, so we couldn't figure out everything."
Summary 6: "We asked more than 300 students about recycling. Most said they recycle paper, but way fewer recycle plastic."
Which communication style is the best fit for Group A (data scientists) and Group B (12-year-olds), respectively? Select the best answer.
ASummary 1 for Group A, Summary 3 for Group В
BSummary 4 for Group A, Summary 3 for Group В
CSummary 6 for Group A, Summary 5 for Group В
DSummary 2 for Group A. Summary Б for Group В
ESummary 6 for Group A, Summary 3 for Group В
FSummary 1 for Group A, Summary 6 for Group В
You are writing a function named process_data() to read and process numerical input from a file. The function must: read the file data.txt, attempt to convert the first line into an integer, handle file, conversion, or index-related exceptions, print the value only if no error occurs, and always print a final message after execution.
Which implementation correctly and robustly meets all these conditions? Select the best answer.
A
B
C
You want to safely read the contents of a file named records.txt and store them in a list. Your requirements are:
The file should be automatically closed after reading,
The code should check whether the file exists before opening it, and
It should handle missing file errors gracefully.
Which of the following is the most appropriate way to accomplish this task in Python? Select the best answer.
A
B
C
D
You have a list of test scores, where each entry includes a student name and a score. Some students appear more than once. You want to compute the average score for each student and store the results in a dictionary. Here's the partial code block:
Which code correctly replaces the # MISSING CODE comment to calculate the average score for each student? Select the best answer.
A
B
C
D
You are reading a data.csv file line by line. To prepare each line for formatting with f-strings, you need to remove extra whitespace and split the values by commas.
Which line should you insert to correctly clean and parse the input?
Afields = line.split().strip(', ')
Bfields = line.strip().split(', ')
Cfields = line.replace(', ', '|').split('|')
Dfields = line.split(', ').trim()
A health researcher uses wearable devices to record physical activity and sends a survey to randomly selected participants across age groups.
Why can this approach be effective? Select the best answer.
AIt uses unstructured interviews to validate automated tracking, improving bias detection.
BIt limits sampling to one demographic, ensuring high-quality data within a specific group.
CIt relies on observational methods, which are more accurate than surveys or sensors.
DIt combines automated data collection with representative sampling, reducing the risk of bias.
The following chart shows how a student spends 24 hours in a day:
Which statements are most accurate? (Choose two.)
ASleep and school take up the majority of time in a day.
BMore time is spent commuting than on leisure.
CLeisure accounts for a moderate portion of the student's daily schedule, larger than commuting but smaller than the time spent at school.
DSchool and homework together take up half of the day’s time.
ELeisure and meals combined equal the time spent at school.
FCommuting is the second most time-consuming activity.