98-381 Exam Questions - Online Test


98-381 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

certleader.com

Actualtests 98-381 Questions are updated and all 98-381 answers are verified by experts. Once you have completely prepared with our 98-381 exam prep kits you will be ready for the real 98-381 exam without a problem. We have Up to the minute Microsoft 98-381 dumps study guide. PASSED 98-381 First attempt! Here What I Did.

NEW QUESTION 1
HOTSPOT
The ABC company needs a way to find the count of particular letters in their publications to ensure that there is a good balance. It seems that there have been complaints about overuse of the letter e. You need to create a function to meet the requirements.
How should you complete this code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-for-loop.php

NEW QUESTION 2
HOTSPOT
The ABC Video company needs a way to determine the cost that a customer will pay for renting a DVD. The cost is dependent on the time of day the DVD is returned. However, there are also special rates on Thursdays and Sundays. The fee structure is shown in the following list:
✑ The cost is $1.59 per night.
✑ If the DVD is returned after 8 PM, the customer will be charged an extra day.
✑ If the video is rented on a Sunday, the customer gets 30% off for as long as they keep the video.
✑ If the video is rented on a Thursday, the customer gets 50% off for as long as they keep the video.
You need to write code to meet the requirements.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References:
https://www.w3resource.com/python/python-operators.php https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 3
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?

  • A. open(“local_data”, “r”)
  • B. open(“local_data”, “r+”)
  • C. open(“local_data”, “w+”)
  • D. open(“local_data”, “w”)

Answer: B

Explanation:
References: https://pythontips.com/2014/01/15/the-open-function-explained/

NEW QUESTION 4
You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.
You need to import the function. Which code segment should you use?

  • A. import math.sqrt as squareRoot
  • B. import sqrt from math as squareRoot
  • C. from math import sqrt as squareRoot
  • D. from math.sqrt as squareRoot

Answer: C

Explanation:
References: https://infohost.nmt.edu/tcc/help/pubs/python/web/import-statement.html

NEW QUESTION 5
HOTSPOT
You create the following program to locate a conference room and display the room name. Line numbers are included for reference only.
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References:
https://www.w3resource.com/python/python-data-type.php https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 6
You are writing code that generates a random integer with a minimum value of 5 and a maximum value of 11.
Which two functions should you use? Each correct answer presents a complete solution. (Choose two.)

  • A. random.randint(5, 12)
  • B. random.randint(5, 11)
  • C. random.randrange(5, 12, 1)
  • D. random.randrange(5, 11, 1)

Answer: BD

Explanation:
References: https://docs.python.org/3/library/random.html#

NEW QUESTION 7
HOTSPOT
You are an intern for ABC electric cars company. You must create a function that calculates the average velocity of their vehicles on a 1320 foot (1/4 mile) track. The output must be as precise as possible.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-data-type.php

NEW QUESTION 8
DRAG DROP
The ABC company is converting an existing application to Python. You are creating documentation that will be used by several interns who are working on the team.
You need to ensure that arithmetic expressions are coded correctly.
What is the correct order of operations for the six classes of operations ordered from first to last in order of precedence? To answer, move all operations from the list of operations to the answer area and arrange them in the correct order.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html

NEW QUESTION 9
HOTSPOT
You develop a Python application for your company.
You have the following code. Line numbers are included for reference only.
98-381 dumps exhibit
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html http://interactivepython.org/runestone/static/pythonds/BasicDS/InfixPrefixandPostfixExpres sions.html

NEW QUESTION 10
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:
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: http://effbot.org/zone/python-with-statement.htm

NEW QUESTION 11
Evaluate the following Python arithmetic expression:
98-381 dumps exhibit
What is the result?

  • A. 3
  • B. 13
  • C. 15
  • D. 69

Answer: C

Explanation:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html

NEW QUESTION 12
You develop a Python application for your company.
You need to accept input from the user and print that information to the user screen. You have started with the following code. Line numbers are included for reference only.
Which code should you write at line 02?
98-381 dumps exhibit

  • A. name = input
  • B. input(“name”)
  • C. input(name)
  • D. name = input()

Answer: B

NEW QUESTION 13
HOTSPOT
You are developing a Python application for your company. You write the following code:
98-381 dumps exhibit
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-list.php

NEW QUESTION 14
HOTSPOT
The ABC company is building a basketball court for its employees to improve company morale.
You are creating a Python program that employees can use to keep track of their average score.
The program must allow users to enter their name and current scores. The program will output the user name and the user’s average score. The output must meet the following requirements:
✑ The user name must be left-aligned.
✑ If the user name has fewer than 20 characters, additional space must be added to the right.
✑ The average score must have three places to the left of the decimal point and one place to the right of the decimal (XXX.X).
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.python-course.eu/python3_formatted_output.php

NEW QUESTION 15
DRAG DROP
You are writing a Python program that evaluates an arithmetic formula.
The formula is described as b equals a multiplied by negative one, then raised to the second power, where a is the value that will be input and b is the result.
You create the following code segment. Line numbers are included for reference only.
98-381 dumps exhibit
98-381 dumps exhibit
You need to ensure that the result is correct.
How should you complete the code on line 02? To answer, drag the appropriate code segment to the correct location. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
b = (-a)**2

NEW QUESTION 16
HOTSPOT
You find errors while evaluating the following code. Line numbers are included for reference only.
98-381 dumps exhibit
You need to correct the code at line 03 and line 06.
How should you correct the code? Use the drop-down menus to select the answer choice
that answers each question based on the information presented in the code segment. NOTE: Each correct selection is worth one point.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-while-loop.php

NEW QUESTION 17
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.)

  • A. employees [1:-4]
  • B. employees [:-5]
  • C. employees [1:-5]
  • D. employees [0:-4]
  • E. employees [0:-5]

Answer: E

Explanation:
References: https://www.w3resource.com/python/python-list.php#slice

NEW QUESTION 18
HOTSPOT
You are coding a math utility by using Python. You are writing a function to compute roots.
The function must meet the following requirements:
98-381 dumps exhibit
How should you complete the code? To answer, select the appropriate code segments in the answer area.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 19
HOTSPOT
You are developing a Python application for an online product distribution company.
You need the program to iterate through a list of products and escape when a target product ID is found.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
NOTE: Each correct selection is worth one point.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-while-loop.php

NEW QUESTION 20
You are creating a Python program that shows a congratulation message to employees on their service anniversary.
You need to calculate the number of years of service and print a congratulatory message. You have written the following code. Line numbers are included for reference only.
98-381 dumps exhibit
You need to complete the program.
Which code should you use at line 03?

  • A. print(“Congratulations on” + (int(end)-int(start)) + “years of service!”
  • B. print(“Congratulations on” + str(int(end)-int(start)) + “years of service!”
  • C. print(“Congratulations on” + int(end - start) + “years of service!”
  • D. print(“Congratulations on” + str(end - start)) + “years of service!”

Answer: A

NEW QUESTION 21
......

Recommend!! Get the Full 98-381 dumps in VCE and PDF From Exambible, Welcome to Download: https://www.exambible.com/98-381-exam/ (New 40 Q&As Version)