98-381 Exam - Introduction to Programming Using Python

certleader.com

Master the 98-381 Introduction to Programming Using Python content and be ready for exam day success quickly with this Actualtests 98-381 brain dumps. We guarantee it!We make it a reality and give you real 98-381 questions in our Microsoft 98-381 braindumps.Latest 100% VALID Microsoft 98-381 Exam Questions Dumps at below page. You can use our Microsoft 98-381 braindumps and pass your exam.

NEW QUESTION 1
HOTSPOT
You are an intern for ABC electric cars company. You must create a function that calculates the average velocity of their vehicles on a 1320 foot (1/4 mile) track. The output must be as precise as possible.
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-data-type.php

NEW QUESTION 2
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

Answer: A

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

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

  • A. name = input
  • B. input(“name”)
  • C. input(name)
  • D. name = input()

Answer: B

NEW QUESTION 4
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 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
Evaluate the following Python arithmetic expression:
98-381 dumps exhibit
What is the result?

  • A. 3
  • B. 13
  • C. 15
  • D. 69

Answer: C

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

NEW QUESTION 7
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 8
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.randint(5, 12)
  • B. random.randint(5, 11)
  • C. random.randrange(5, 12, 1)
  • D. random.randrange(5, 11, 1)

Answer: BD

Explanation:
References: https://docs.python.org/3/library/random.html#

NEW QUESTION 9
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 10
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 11
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 12
HOTSPOT
The ABC company is building a basketball court for its employees to improve company morale.
You are creating a Python program that employees can use to keep track of their average score.
The program must allow users to enter their name and current scores. The program will output the user name and the user’s average score. The output must meet the following requirements:
✑ The user name must be left-aligned.
✑ If the user name has fewer than 20 characters, additional space must be added to the right.
✑ The average score must have three places to the left of the decimal point and one place to the right of the decimal (XXX.X).
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.python-course.eu/python3_formatted_output.php

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

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
98-381 dumps exhibit

NEW QUESTION 15
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 16
DRAG DROP
You are writing a Python program to perform arithmetic operations. You create the following code:
98-381 dumps exhibit
98-381 dumps exhibit
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.

  • A. Mastered
  • B. Not Mastered

Answer: A

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

NEW QUESTION 17
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:
98-381 dumps exhibit
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 18
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]

Answer: E

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

NEW QUESTION 19
......

P.S. Passcertsure now are offering 100% pass ensure 98-381 dumps! All 98-381 exam questions have been updated with correct answers: https://www.passcertsure.com/98-381-test/ (40 New Questions)