98-381 문제 26

HOTSPOT
You are developing a Python application for an online game.
You need to create a function that meets the following criteria:
* The function is named update_score
* The function receives the current score and a value
* The function adds the value to the current score
* The function returns the new score
How should you complete the code? To answer, select the appropriate code segments in the answer area.

98-381 문제 27

DRAG DROP
You are writing a function that works with files.
You need to ensure that the function returns None if the file does not exist. If the file does exist, the function must return the first line.
You write the following code:

In which order should you arrange the code segments to complete the function? To answer, move all code segments from the list of code segments to the answer area and arrange them in the correct order.
Select and Place:

98-381 문제 28

HOTSPOT
You create the following program to locate a conference room and display the room name. Line numbers are
included for reference only.

Colleagues report that the program sometimes produces incorrect results.
You need to troubleshoot the program. Use the drop-down menus to select the answer choice that answers
each question based on the information presented in the code segment.
Hot Area:

98-381 문제 29

You develop a Python application for your company.
A list named employees contains 200 employee names, the last five being company management. You need to slice the list to display all employees excluding management.
Which two code segments should you use? Each correct answer presents a complete solution. (Choose two.)

98-381 문제 30

You are creating a function that manipulates a number. The function has the following requirements:
A floatis passed into the function

The function must take the absolute value of the float

Any decimal points after the integer must be removed

Which two math functions should you use? Each correct answer is part of the solution. (Choose two.)