Microsoft 98-381 Exam Dumps [2021] Practice Valid Exam Dumps Question
98-381 Dumps - Grab Out For [NEW-2021] Microsoft Exam
Basic Exam Prerequisites
It's suggested that applicants for 98-381 have notable expertise in writing syntactically correct Python code and handle associates tasks with full perfection. The vendor also recommends the intended candidates to have a bare minimum experience of 100 hours in Python programming language for easy exam journey. Besides that, it is important to have knowledge of Python features and capabilities, code generation procedure, basis principles of debugging the programming issues, and fundamental skills in maintaining the Python code.
Who Is 98-381 Exam Intended for?
The candidates who want to take this test should be able to recognize and write correct Python code that logically solves a problem and recognizes data types supported by Python. Also, the candidates should have at least 100 hours of working experience with a Python programming language and know its features and capabilities before taking the final exam. Moreover, the candidate should also know how to debug, write, and support well-documented Python code.
NEW QUESTION 12
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 13
Evaluate the following Python arithmetic expression:
What is the result?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: A
Explanation:
References:
http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
NEW QUESTION 14
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 07
- G. Line 04
- H. Line 05
Answer: C,E,F
NEW QUESTION 15
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:
Explanation:
References:
https://www.w3resource.com/python/python-data-type.php
https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 16
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 17
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,C
Explanation:
Explanation/Reference:
References: https://docs.python.org/3/library/random.html#
NEW QUESTION 18
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.
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" + str(end - start)) + "years of service!")
- D. print("Congratulations on" + int(end - start) + "years of service!")
Answer: B
Explanation:
Explanation/Reference:
int must be converted to string
NEW QUESTION 19
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.
Hot Area:
Answer:
Explanation:
Explanation/Reference:
References: https://www.w3resource.com/python/python-format.php#num
NEW QUESTION 20
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(miles, calories_per_mile):
- D. 04 def calc_calories():
- E. 01 def get_name():
- F. 04 def calc_calories(miles, burn_rate):
Answer: C,E
Explanation:
Explanation/Reference:
References: https://www.w3resource.com/python/python-user-defined-functions.php
NEW QUESTION 21
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.
Select and Place:
Answer:
Explanation:
Section: (none)
Explanation/Reference:
References: https://www.w3resource.com/python/python-operators.php
NEW QUESTION 22
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 23
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.
Select and Place:
Answer:
Explanation:
Explanation/Reference:
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 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.
Select and Place:
Answer:
Explanation:
Explanation/Reference:
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
You are coding a math utility by using Python.
You are writing a function to compute roots.
The function must meet the following requirements:
How should you complete the code? To answer, select the appropriate code segments in the answer area.
Answer:
Explanation:
Explanation:
References: https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 26
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.
Answer:
Explanation:
Explanation:
References: https://www.w3resource.com/python/python-for-loop.php
NEW QUESTION 27
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 ais the value that will be input and bis the result.
You create the following code segment. Line numbers are included for reference only.
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.
Select and Place:
Answer:
Explanation:
Section: (none)
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:
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
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 31
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 32
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. name = input()
- B. name = input
- C. input(name)
- D. input("name")
Answer: D
Explanation:
Section: (none)
NEW QUESTION 33
......
98-381 Exam Dumps PDF Guaranteed Success with Accurate & Updated Questions: https://www.dumpexams.com/98-381-real-answers.html