Pass Your 98-381 Exam Easily - Real 98-381 Practice Dump Updated Jan 23, 2022
2022 Realistic Verified Free Microsoft 98-381 Exam Questions
General Exam Layout
Since 98-381 exam is a part of the MTA certification line, it follows the pattern of the entry-level tests set by Microsoft. As per the details revealed by the vendor, this exam is 50-minutes long and consists of 40-60 questions of the MCQ format. The passing score is 700/1000 and the results one gains have a lifetime validity. Also, there is no negative marking for wrong answers.
As the exam is available globally, there are many language choices to address different audiences. Presently, applicants can take up the test in English, Simplified and Traditional Chinese French, German, Italian, Japanese, Korean, Portuguese (Brazil), Russian, Spanish, and Spanish (Mexico).
The exam fee is $127 which is likely to change as per the country. Finally, note that there are no re-certification criteria, candidates can go on to earn other certificates any time they get ready.
NEW QUESTION 17
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 18
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 19
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. 04 def calc_calories(miles, burn_rate):
- B. 04 def calc_calories():
- C. 01 def get_name(name):
- D. 01 def get_name(biker):
- E. 04 def calc_calories(miles, calories_per_mile):
- F. 01 def get_name():
Answer: A,D
Explanation:
References: https://www.w3resource.com/python/python-user-defined-functions.php
NEW QUESTION 20
HOTSPOT
You work for a company that distributes media for all ages.
You are writing a function that assigns a rating based on a user's age. The function must meet the following requirements:
* Anyone 18 years old or older receives a rating of "A"
* Anyone 13 or older, but younger than 18, receives a rating of "T"
* Anyone 12 years old or younger receives a rating of "C"
* If the age is unknown, the rating is set to "C"
You need to complete the code to meet the requirements.
Answer:
Explanation:
Explanation:
References: https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 21
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.
Answer:
Explanation:
References:
https://www.w3resource.com/python/python-list.php
NEW QUESTION 22
HOTSPOT
You are writing a Python program to validate employee numbers.
The employee number must have the format ddd-dd-dddd and consist only of numbers and dashes. The program must print Trueif the format is correct and print Falseif the format is incorrect.
How should you complete the code? To answer, select the appropriate code segments in the answer area.
Hot Area:
Answer:
Explanation:
NEW QUESTION 23
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. Option D
- B. Option A
- C. Option C
- D. Option B
Answer: D
NEW QUESTION 24
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:
- A. Option D
- B. Option B
- C. Option A
- D. Option C
Answer: C
Explanation:
Explanation/Reference:
https://www.dotnetperls.com/readline-python
NEW QUESTION 25
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.
Hot Area:
Answer:
Explanation:
Section: (none)
Explanation/Reference:
References: https://www.w3resource.com/python/python-for-loop.php
NEW QUESTION 26
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 27
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.
Hot Area:
Answer:
Explanation:
Explanation/Reference:
References: https://www.w3resource.com/python/python-if-else-statements.php
NEW QUESTION 28
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 29
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", "r")
- C. open("local_data", "r+")
- D. open("local_data", "w+")
Answer: D
Explanation:
Modes 'r+', 'w+' and 'a+' open the file for updating (reading and writing). Mode 'w+' truncates the file.
References:
https://docs.python.org/2/library/functions.html
https://pythontips.com/2014/01/15/the-open-function-explained/
NEW QUESTION 30
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 31
HOTSPOT
You are developing a Python application for an online game.
You need to create a function that meets the following criteria:
* The function is named update_score
* The function receives the current score and a value
* The function adds the value to the current score
* The function returns the new score
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-user-defined-functions.php
NEW QUESTION 32
You develop a Python application for your company.
You want to add notes to your code so other team members will understand it.
What should you do?
- A. Place the notes inside of parentheses on any time
- B. Place the notes after the # sign on any line
- C. Place the notes after the last line of code separated by a blank line
- D. Place the notes before the first line of code separated by a blank line
Answer: B
Explanation:
References:
http://www.pythonforbeginners.com/comments/comments-in-python
NEW QUESTION 33
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.
- A. The code runs, but generates a logic error
- B. No change is needed
- C. The code will generate a runtime error
- D. The code will generate a syntax error
Answer: D
Explanation:
References:
https://docs.python.org/2/library/exceptions.html
NEW QUESTION 34
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 06
- B. Line 03
- C. Line 01
- D. Line 04
- E. Line 07
- F. Line 05
- G. Line 08
- H. Line 02
Answer: A,E,G
NEW QUESTION 35
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.randrange(5, 11, 1)
- B. random.randint(5, 12)
- C. random.randint(5, 11)
- D. random.randrange(5, 12, 1)
Answer: A,C
Explanation:
References:
https://docs.python.org/3/library/random.html#
NEW QUESTION 36
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.
Hot Area:
Answer:
Explanation:
Explanation/Reference:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
http://interactivepython.org/runestone/static/pythonds/BasicDS/InfixPrefixandPostfixExpressions.html
NEW QUESTION 37
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 38
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: A
NEW QUESTION 39
You are creating a function that manipulates a number. The function has the following requirements:
A float is 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.frexp(x)
- C. math.floor(x)
- D. math.ceil(x)
- E. math.fmod(x)
Answer: A,D
Explanation:
References:
https://docs.python.org/2/library/math.html#number-theoretic-and-representation-functions
NEW QUESTION 40
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. import sqrt from math as squareRoot
- C. from math.sqrt as squareRoot
- D. from math import sqrt as squareRoot
Answer: D
Explanation:
Explanation/Reference:
References: https://infohost.nmt.edu/tcc/help/pubs/python/web/import-statement.html
NEW QUESTION 41
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:
Explanation:
References: https://www.w3resource.com/python/python-operators.php
NEW QUESTION 42
......
For more info visit:
Microsoft 98-381 Exam Reference
Introduction to Programming Using Python 98-381 Exam
Introduction to Programming Using Python 98-381 Exam which is related to Microsoft Certified Technology Associate Certification. This exam measures and validates the Candidates ability to recognize and write syntactically correct Python code, recognize data types supported by Python, and have the working experience of writing code of Python language that will logically solve a given problem. Microsoft Technology Associate usually holds or pursue this certification and you can expect the same job role after completion of this certification.
98-381 Real Exam Questions and Answers FREE: https://www.passcollection.com/98-381_real-exams.html

