Latest Lead4Pass MTA 98-381 exam practice questions and 98-381 exam dumps

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


QUESTION 1

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

http://www.pythonforbeginners.com/comments/comments-in-python


QUESTION 2

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.

Hot Area:

Correct Answer:


QUESTION 3

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.

https://docs.python.org/2/library/functions.htmlhttps://pythontips.com/2014/01/15/the-open-function-explained/


QUESTION 4

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:


QUESTION 5

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


QUESTION 6

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.

Hot Area:

Correct Answer:


QUESTION 7

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.

Hot Area:

Correct Answer:


QUESTION 8

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:


QUESTION 9

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

https://www.w3resource.com/python/python-list.php#slice


QUESTION 10

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:

Correct Answer:


QUESTION 11

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

B. input("name")

C. input(name)

D. name = input()

Correct Answer: B


QUESTION 12

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.)

A. math.fmod(x)

B. math.frexp(x)

C. math.floor(x)

D. math.ceil(x)

E. math.fabs(x)

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

https://docs.python.org/2/library/math.html#number-theoretic-and-representation-functionshttps://docs.python.org/3/library/math.html


[p.s.2] Get Google Drive Microsoft MTA 98-381 dumps PDF from Lead4Pass for free:

https://drive.google.com/file/d/1SunKAPq4fjD_gyTHZVje4WlUdxRsTII1/


[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.


Skills measured

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"

Cards you may also be interested in
https://www.econease.com/2023/01/ultimate-blueprint-mastering-affiliate-marketing.html
sherifzeftawi
1
0
0
Considerations for Choosing the Best Ice Climbing Axe: Terrain, Skill Level, and More
chathura1998
1
0
0
Dish Network has launched its 5G service in Las Vegas, USA.
bdswapnil
2
0
0
How Family Life is Changing Today
irenashores
3
0
0
الإستراتيجية الإحترافية للعمل والحصول على دخل يوميا من الإنترنت
sopernet
1
0
0
Dental Prosthetics Market Comprehensive Research Study, Trends, Share, Emerging Factors and Future Demands
chedeaarti08
2
0
2
Web Hosting Company in Rajkot, Gujarat, India - NodeChamp
nodechamp
1
0
0
https://www.econease.com/2023/01/unlocking-potential-e-commerce-guide-profiting-internet.html
sherifzeftawi
1
0
0
2023 Latest Braindump2go MB-700 PDF Dumps(Q68-Q100)
Dalenews
1
0
0
Hire Droidal - One Of The Leading RPA Solutions Provider In Dallas
clarajonson
2
0
0
Mua Spotify Premium hàng chính chủ - Giá chỉ 36K/tháng
gamikeydigital
1
0
0
Microsoft Surface service center in Dubai
ramseetha
3
0
3
Step wise instruction to Install and Setup Belkin router in just a few minutes
timmkvinn
2
0
0
GrammarlyGo: A new Chatgpt-style AI Powered Tool by Grammarly
robertbenjamin
1
0
0
https://www.econease.com/2023/01/power-cutting-edge-technologies-e-commerce.html
sherifzeftawi
1
0
0
Hard disk recovery Dubai
ramseetha
1
0
0
Role of Chatbots in the Retail Industry
botgo
1
0
1
Ayurvedic Product Manufacturers | Ayurvedic Medicine Manufacturer
HerbalHills
3
0
3
Top industries using MS Dynamics NAV Users Email List
rogerslydia42
2
0
1
2023 Latest Braindump2go MS-203 PDF Dumps(Q93-Q136)
Dalenews
1
0
0
4.7 Star App Store Review!
Cpl.dev***uke
The Communities are great you rarely see anyone get in to an argument :)
king***ing
Love Love LOVE
Download

Select Collections