aiotestking uk

98-381 Exam Questions - Online Test


98-381 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

Act now and download your Microsoft 98-381 test today! Do not waste time for the worthless Microsoft 98-381 tutorials. Download Updated Microsoft Introduction to Programming Using Python exam with real questions and answers and begin to learn Microsoft 98-381 with a classic professional.

Also have 98-381 free dumps questions for you:

NEW QUESTION 1
HOTSPOT
You are developing a Python application for an online product distribution company.
You need the program to iterate through a list of products and escape when a target product ID is found.
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.
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
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.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://www.w3resource.com/python/python-format.php#num

NEW QUESTION 3
DRAG DROP
You are writing a Python program. The program collects customer data and stores it in a database.
The program handles a wide variety of data.
You need to ensure that the program handles the data correctly so that it can be stored in the database correctly.
Match the data type to the code segment. To answer, drag the appropriate data type from the column on the left to its code segment on the right. 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 4
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 5
This question requires that you evaluate the underlined text to determine if it is correct.
You write the following code:
98-381 dumps exhibit
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. No change is needed
  • B. The code runs, but generates a logic error
  • 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 6
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.
98-381 dumps exhibit
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():
  • B. 01 def get_name(biker):
  • C. 01 def get_name(name):
  • D. 04 def calc_calories():
  • E. 04 def calc_calories(miles, burn_rate):
  • F. 04 def calc_calories(miles, calories_per_mile):

Answer: BE

Explanation:
References: https://www.w3resource.com/python/python-user-defined-functions.php

NEW QUESTION 7
HOTSPOT
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
98-381 dumps exhibit

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: https://docs.python.org/2.0/ref/try.html

NEW QUESTION 8
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 9
You are writing an application that uses the sqrt function. 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 import sqrt as squareRoot
  • D. from math.sqrt as squareRoot

Answer: C

Explanation:
References: https://infohost.nmt.edu/tcc/help/pubs/python/web/import-statement.html

NEW QUESTION 10
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 11
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 12
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 13
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 14
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 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
......

Thanks for reading the newest 98-381 exam dumps! We recommend you to try the PREMIUM Certstest 98-381 dumps in VCE and PDF here: https://www.certstest.com/dumps/98-381/ (40 Q&As Dumps)