It is more faster and easier to pass the Microsoft 98-381 exam by using Approved Microsoft Introduction to Programming Using Python questuins and answers. Immediate access to the Abreast of the times 98-381 Exam and find the same core area 98-381 questions with professionally verified answers, then PASS your exam with a high score now.

Microsoft 98-381 Free Dumps Questions Online, Read and Test Now.

NEW QUESTION 1
HOTSPOT
You find errors while evaluating the following code. Line numbers are included for reference only.
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-while-loop.php

NEW QUESTION 2
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:
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-data-type.php

NEW QUESTION 3
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 4
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-data-type.php

NEW QUESTION 5
HOTSPOT
You are developing a Python application for your company. You write the following code:
98-381 dumps exhibit
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-list.php

NEW QUESTION 6
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-for-loop.php

NEW 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.
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References:
https://www.w3resource.com/python/python-data-type.php https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 8
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:
98-381 dumps exhibit
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.
98-381 dumps exhibit
Which code should you write for line 05 and line 06?
98-381 dumps exhibit

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D

Answer: B

NEW QUESTION 9
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.
98-381 dumps exhibit
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” + int(end - start) + “years of service!”
  • D. print(“Congratulations on” + str(end - start)) + “years of service!”

Answer: A

NEW QUESTION 10
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.fmod(x)
  • B. math.frexp(x)
  • C. math.floor(x)
  • D. math.ceil(x)
  • E. math.fabs(x)

Answer: DE

Explanation:
References: https://docs.python.org/2/library/math.html#number-theoretic-and- representation-functions

NEW QUESTION 11
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”)

Answer: B

Explanation:
References: https://pythontips.com/2014/01/15/the-open-function-explained/

NEW QUESTION 12
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References:
https://www.w3resource.com/python/python-operators.php https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 13
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

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 14
The ABC company has hired you as an intern on the coding team that creates e-commerce applications.
You must write a script that asks the user for a value. The value must be used as a whole number in a calculation, even if the user enters a decimal value.
You need to write the code to meet the requirements. Which code segment should you use?

  • A. totalItems = input(“How many items would you like?”)
  • B. totalItems = float(input(“How many items would you like?”))
  • C. totalItems = str(input(“How many items would you like?”))
  • D. totalItems = int(input(“How many items would you like?”))

Answer: A

Explanation:
References: http://www.informit.com/articles/article.aspx?p=2150451&seqNum=6

NEW QUESTION 15
DRAG DROP
The ABC company is converting an existing application to Python. You are creating documentation that will be used by several interns who are working on the team.
You need to ensure that arithmetic expressions are coded correctly.
What is the correct order of operations for the six classes of operations ordered from first to last in order of precedence? To answer, move all operations from the list of operations to the answer area and arrange them in the correct order.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html

NEW QUESTION 16
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:
98-381 dumps exhibit
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-if-else-statements.php

NEW QUESTION 17
......

100% Valid and Newest Version 98-381 Questions & Answers shared by Dumpscollection, Get Full Dumps HERE: http://www.dumpscollection.net/dumps/98-381/ (New 40 Q&As)