[Oct 21, 2021] Get Free Updates Up to 365 days On Developing 98-381 Braindumps
Best Quality Microsoft 98-381 Exam Questions
NEW QUESTION 19
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-operators.php
https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 20
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-data-type.php
https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 21
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 sqrt from math as squareRoot
- B. from math import sqrt as squareRoot
- C. from math.sqrt as squareRoot
- D. import math.sqrt as squareRoot
Answer: B
Explanation:
Section: (none)
Explanation/Reference:
References: https://infohost.nmt.edu/tcc/help/pubs/python/web/import-statement.html
NEW QUESTION 22
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-data-type.php
NEW QUESTION 23
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?
- A. input(name)
- B. name = input
- C. input("name")
- D. name = input()
Answer: C
NEW QUESTION 24
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.)
- A. math.fabs(x)
- B. math.fmod(x)
- C. math.floor(x)
- D. math.frexp(x)
- E. math.ceil(x)
Answer: A,E
Explanation:
Section: (none)
Explanation/Reference:
References: https://docs.python.org/2/library/math.html#number-theoretic-and-representation-functions
NEW QUESTION 25
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.)
- A. math.fabs(x)
- B. math.fmod(x)
- C. math.floor(x)
- D. math.frexp(x)
- E. math.ceil(x)
Answer: A,C
Explanation:
C: math.floor(x) returns the largest integer less than or equal to x.
E: math.fabs(x) returns the absolute value of x.
Incorrect Answers:
A: math.fmod() takes two variables
B: math.frexp(x) returns the mantissa and exponent of x as the pair (m, e). m is a float and e is an integer
D: math.ceil(x) returns the smallest integer greater than or equal to x
References: https://docs.python.org/2/library/math.html#number-theoretic-and-representation-functions
https://docs.python.org/3/library/math.html
NEW QUESTION 26
HOTSPOT
You develop a Python application for your company.
You have the following code. Line numbers are included for reference only.
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
Answer:
Explanation:
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 27
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:
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 28
HOTSPOT
You are designing a decision structure to convert a student's numeric grade to a letter grade. The program must assign a letter grade as specified in the following table:
For example, if the user enters a 90, the output should be, "Your letter grade is A". Likewise, if a user enters an 89, the output should be "Your letter grade is B".
How should you complete the code? To answer, select the appropriate code segments in the answer area.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 29
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-while-loop.php
NEW QUESTION 30
You are writing a Python program to automate inventory. Your first task is to read a file of inventory transactions. The file contains sales from the previous day, including the item id, price, and quantity.
The following shows a sample of data from the file:
The code must meet the following requirements:
* Each line of the file must be read and printed
* If a blank line is encountered, it must be ignored
* When all lines have been read, the file must be closed
You create the following code. Line numbers are included for reference only.
Which code should you write for line 05 and line 06?
- A.

- B.

- C.

- D.

Answer: B
Explanation:
Explanation/Reference:
https://www.dotnetperls.com/readline-python
NEW QUESTION 31
HOTSPOT
You find errors while evaluating the following code. Line numbers are included for reference only.
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.
Answer:
Explanation:
Explanation:
References: https://www.w3resource.com/python/python-while-loop.php
NEW QUESTION 32
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:
Explanation:
References: https://www.w3resource.com/python/python-format.php#num
NEW QUESTION 33
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-while-loop.php
NEW QUESTION 34
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", "w+")
- B. open("local_data", "w")
- C. open("local_data", "r+")
- D. open("local_data", "r")
Answer: C
Explanation:
References: https://pythontips.com/2014/01/15/the-open-function-explained/
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-data-type.php
NEW QUESTION 36
Evaluate the following Python arithmetic expression:
What is the result?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
Explanation:
Explanation/Reference:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
NEW QUESTION 37
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.)
- A. math.fabs(x)
- B. math.fmod(x)
- C. math.floor(x)
- D. math.frexp(x)
- E. math.ceil(x)
Answer: A,E
Explanation:
Explanation/Reference:
References: https://docs.python.org/2/library/math.html#number-theoretic-and-representation-functions
NEW QUESTION 38
HOTSPOT
You are developing a Python application for your company.
You write the following code:
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:
Answer:
Explanation:
Section: (none)
Explanation/Reference:
References: https://www.w3resource.com/python/python-list.php
NEW QUESTION 39
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:
Explanation:
References: https://www.w3resource.com/python/python-data-type.php
NEW QUESTION 40
HOTSPOT
During school holidays, you volunteer to explain some basic programming concepts to younger siblings.
You want to introduce the concept of data types in Python. You create the following three code segments:
You need to evaluate the code segments.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Explanation:
References: https://www.w3resource.com/python/python-data-type.php
NEW QUESTION 41
......
Microsoft Exam Practice Test To Gain Brilliante Result: https://www.passtestking.com/Microsoft/98-381-practice-exam-dumps.html