98-381 Exam Question 16

This question requires that you evaluate the underlined text to determine if it is correct.
You write the following code:

The out.txt file does not exist. You run the code. The code will execute without error.
Review the underlined text. If it makes the statement correct, select "No change is needed". If the statement is incorrect, select the answer choice that makes the statement correct.
  • 98-381 Exam Question 17

    The ABC company is creating a program that allows customers to log the number of miles biked. The program will send messages based on how many miles the customer logs.
    You create the following Python code. Line numbers are included for reference only.

    You need to define the two required functions.
    Which code segments should you use for line 01 and line 04? Each correct answer presents part of the solution? (Choose two.)
  • 98-381 Exam Question 18

    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 Exam Question 19

    You develop a Python application for your school.
    You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed.
    Which code should you use?
  • 98-381 Exam Question 20

    You develop a Python application for your school.
    You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed.
    Which code should you use?