2021 98-381 dumps review - Professional Quiz Study Materials [Q20-Q39]

Share

2021 98-381 dumps review - Professional Quiz Study Materials

98-381 Test Prep Training Practice Exam Questions Practice Tests


Domain Taking care of Troubleshooting & Error Handling

Speaking of the fifth domain, it is all about knowing the ins and outs of Python-related troubleshooting and error handling. This section tries to impart best-of-breed understanding about analyzing, detecting and fixing error code segments that are known to involve errors. Applicants have to learn more about the errors related to syntax, logic, and runtime. In addition, one's knowledge of analyzing and constructing exception handling code segments is required.


What career opportunities are associated with the Microsoft 98-381 exam?

After completing the Microsoft 98-381 exam, you will get the MTA: Introduction to Programming Using Python certificate. The individuals with this certification can effectively work with Python at the professional level. These people are ready to explore the cutting-edge aspects of the general-purpose, high-level programming language as well as related technologies. The most popular job roles that the certified candidates can apply for with this certificate include Data Scientists, DevOps Engineers, System Admins, Web Developers, Application Developers, and Python Developers. These titles also come with a good salary package. On average, those who have obtained the MTA certification can earn about $101,000 per year. Specifically, these are the salaries for each position:

  • Software Developer: $118,950
  • Data Scientist: $91,838
  • Senior Software Engineer: $129,000
  • DevOps Engineer: $93,931
  • Software Engineer: $89,003

 

NEW QUESTION 20
HOTSPOT
The ABC organics company needs a simple program that their call center will use to enter survey data for a new coffee variety.
The program must accept input and return the average rating based on a five-star scale. The output must be rounded to two decimal places.
You need to complete the code to meet the requirements.
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.

Answer:

Explanation:

References:
https://www.w3resource.com/python/python-format.php#num

 

NEW QUESTION 21
HOTSPOT
You create a function to calculate the power of a number by using Python.
You need to ensure that the function is documented with comments.
You create the following code. Line numbers are included for reference only.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Answer Area

Answer:

Explanation:

References:
http://www.pythonforbeginners.com/comments/comments-in-python
https://www.w3resource.com/python/python-string.php

 

NEW QUESTION 22
Evaluate the following Python arithmetic expression:

What is the result?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: A

Explanation:
Section: (none)
Explanation/Reference:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html

 

NEW QUESTION 23
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Answer:

Explanation:

References:
https://docs.python.org/2.0/ref/try.html

 

NEW QUESTION 24
DRAG DROP
You are building a Python program that displays all of the prime numbers from 2 to 100.
How should you complete the code? To answer, drag the appropriate code segments 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.

Answer:

Explanation:

References:
https://docs.python.org/3.1/tutorial/inputoutput.html
https://stackoverflow.com/questions/11619942/print-series-of-prime-numbers-in-python
https://www.programiz.com/python-programming/examples/prime-number-intervals

 

NEW QUESTION 25
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Answer:

Explanation:

Explanation:

References: https://docs.python.org/2.0/ref/try.html

 

NEW QUESTION 26
You are creating a function that reads a data file and prints each line of the file.
You write the following code. Line numbers are included for reference only.

The code attempts to read the file even if the file does not exist.
You need to correct the code.
Which three lines have indentation problems? Each correct answer presents part of the solution. (Choose three.)

  • A. Line 02
  • B. Line 01
  • C. Line 08
  • D. Line 03
  • E. Line 06
  • F. Line 04
  • G. Line 07
  • H. Line 05

Answer: E

 

NEW QUESTION 27
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, 11)
  • B. random.randrange(5, 11, 1)
  • C. random.randrange(5, 12, 1)
  • D. random.randint(5, 12)

Answer: A,B

Explanation:
Section: (none)
Explanation/Reference:
References: https://docs.python.org/3/library/random.html#

 

NEW QUESTION 28
DRAG DROP
Match the data type to the type operations.
To answer, drag the appropriate data type to the correct type operation. Each data type may be used once, more than once, or not at all.

Answer:

Explanation:

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

 

NEW QUESTION 29
DRAG DROP
You are creating a Python script to evaluate input and check for upper and lower case.
Which four code segments should you use to develop the solution? To answer, move the appropriate code
segment from the list of code segments to the answer area and arrange them in the correct order.
Select and Place:

Answer:

Explanation:

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

 

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

  • A. 01 def get_name(name):
  • B. 01 def get_name(biker):
  • C. 04 def calc_calories():
  • D. 01 def get_name():
  • E. 04 def calc_calories(miles, burn_rate):
  • F. 04 def calc_calories(miles, calories_per_mile)

Answer: D,F

Explanation:
Explanation/Reference:
References: https://www.w3resource.com/python/python-user-defined-functions.php

 

NEW QUESTION 31
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.

Answer:

Explanation:

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

 

NEW QUESTION 32
The ABC company has hired you as an intern on the coding team that creates e-commerce applications.
You must write a script that asks the user for a value. The value must be used as a whole number in a
calculation, even if the user enters a decimal value.
You need to write the code to meet the requirements.
Which code segment should you use?

  • A. totalItems = int(input("How many items would you like?"))
  • B. totalItems = input("How many items would you like?")
  • C. totalItems = float(input("How many items would you like?"))
  • D. totalItems = str(input("How many items would you like?"))

Answer: C

Explanation:
Explanation/Reference:
References: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/io.html

 

NEW QUESTION 33
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.

Answer:

Explanation:

Explanation:

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

 

NEW QUESTION 34
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.
Hot Area:

Answer:

Explanation:

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

 

NEW QUESTION 35
DRAG DROP
Match the data type to the type operations.
To answer, drag the appropriate data type to the correct type operation. Each data type may be used once, more than once, or not at all.
Select and Place:

Answer:

Explanation:

Section: (none)
Explanation/Reference:
References: https://www.w3resource.com/python/python-data-type.php

 

NEW QUESTION 36
You are writing an application that uses the sqrtfunction. 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. C.from math import sqrt as squareRoot
  • C. import sqrt from math as squareRoot
  • D. from math.sqrt as squareRoot

Answer: B

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

 

NEW QUESTION 37
DRAG DROP
You are writing a Python program. The program collects customer data and stores it in a database.
The program handles a wide variety of data.
You need to ensure that the program handles the data correctly so that it can be stored in the database correctly.
Match the data type to the code segment. To answer, drag the appropriate data type from the column on the left to its code segment on the right. Each data type may be used once, more than once, or not at all.
Select and Place:

Answer:

Explanation:

Section: (none)
Explanation/Reference:
References: https://www.w3resource.com/python/python-data-type.php

 

NEW QUESTION 38
DRAG DROP
You are writing a Python program to perform arithmetic operations.
You create the following code:


What is the result of each arithmetic expression? To answer, drag the appropriate expression from the column on the left to its result on the right. Each expression may be used once, more than once, or not at all.

Answer:

Explanation:

References:
https://www.w3resource.com/python/python-operators.php

 

NEW QUESTION 39
......

Exam Questions Answers Braindumps 98-381 Exam Dumps PDF Questions: https://www.pass4surequiz.com/98-381-exam-quiz.html