Lead4Pass MTA 98-381 Exams "Introduction to Programming Using Python".
Full Microsoft MTA 98-381 exam dumps: https://www.lead4pass.com/98-381.html
Microsoft MTA 98-381 exam tips list:
[p.s.1] Microsoft 98-381 exam practice questions
[p.s.2] Microsoft 98-381 exam Pdf
[p.s.3] Microsoft MTA up-to-date information
[p.s.4] Lead4pass Coupon 2020
[p.s.1] Share a part of the Microsoft MTA 98-381 exam practice questions from Lead4Pass for free
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 after the # sign on any line
B. Place the notes after the last line of code separated by a blank line
C. Place the notes before the first line of code separated by a blank line
D. Place the notes inside of parentheses on any time
Correct Answer: A
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 the 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.
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")
Correct Answer: C
Modes \\'r+\\', \\'w+\\' and \\'a+\\' open the file for updating (reading and writing). Mode \\'w+\\' truncates the file.
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:
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 01
B. Line 02
C. Line 03
D. Line 04
E. Line 05
F. Line 06
G. Line 07
H. Line 08
Correct Answer: FGH
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 True if the format is correct and print False if the format is incorrect. How should you complete the code? To answer, select the appropriate code segments in the answer area.
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.
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.
Select and Place:
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]
Correct Answer: BE
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.
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:
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 inline 02?
A. name = input
D. name = input()
Correct Answer: B
You are creating a function that manipulates a number. The function has the following requirements: A float is passed into 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.)
Correct Answer: CE
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 afloat and e is an integer
D: math.ceil(x) returns the smallest integer greater than or equal to x
[p.s.2] Get Google Drive Microsoft MTA 98-381 dumps PDF from Lead4Pass for free:
[p.s.3] Exam 98-381: Introduction to Programming Using Python: https://docs.microsoft.com/en-us/learn/certifications/exams/98-381
Candidates for this exam should be able to recognize and write syntactically correct Python code, recognize data types supported by Python, and be able to recognize and write Python code that will logically solve a given problem.
Candidates are expected to have had, at a minimum, instruction and/or hands-on experience of approximately 100 hours with the Python programming language, be familiar with its features and capabilities, and understand how to write, debug, and maintain well-formed, well documented Python code.
1. Perform Operations using Data Types and Operators (20-25%)
2. Control Flow with Decisions and Loops (25-30%)
3. Perform Input and Output Operations (20-25%)
4. Document and Structure Code (15-20%)
5. Perform Troubleshooting and Error Handling (5-10%)
6. Perform Operations Using Modules and Tools (1-5%)
[p.s.4] [12% off]Lead4pass Coupon code 2020: "lead4pass2020"