Microsoft Introduction to Programming Using Python (98-381) Certification Sample Questions

Introduction to Programming Using Python Dumps, 98-381 Dumps, 98-381 PDF, Introduction to Programming Using Python VCE, Microsoft 98-381 VCE, Microsoft MTA Introduction to Programming Using Python PDFThe purpose of this Sample Question Set is to provide you with information about the Microsoft Introduction to Programming Using Python exam. These sample questions will make you very familiar with both the type and the difficulty level of the questions on the 98-381 certification test. To get familiar with real exam environment, we suggest you try our Sample Microsoft Introduction to Programming Using Python Certification Practice Exam. This sample practice exam gives you the feeling of reality and is a clue to the questions asked in the actual Microsoft Technology Associate (MTA) - Introduction to Programming Using Python certification exam.

These sample questions are simple and basic questions that represent likeness to the real Microsoft 98-381 exam questions. To assess your readiness and performance with real time scenario based questions, we suggest you prepare with our Premium Microsoft Introduction to Programming Using Python Certification Practice Exam. When you solve real time scenario based questions practically, you come across many difficulties that give you an opportunity to improve.

Microsoft 98-381 Sample Questions:

01. 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)
 
02. Evaluate the following Python arithmetic expression:
What is the result?
a) 3
b) 13
c) 15
d) 69
 
03. 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
 
04. 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?"))
 
05. 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]
 
06. You have the following code:
v = bool([False])
x = bool(3)
y = bool("")
z = bool(' ')
Which of the variables will equal False?
a) z
b) y
c) x
d) v
 
07. 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
 
08. You run the following code:
def calc1(rate, item):
item *= (1 + rate)
rate = 0.25
item = 12000
calc1(rate, item)
print('Rate:', rate, '; Value:', item)
What will be displayed on the screen?
a) Rate: 1.25 ; Value: 15000
b) Rate: 1.25 ; Value: 12000
c) Rate: 0.25 ; Value: 15000
d) Rate: 0.25 ; Value: 12000
 
09. 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", "w+")
c) open("local_data", "r+")
d) open("local_data", "w")
 
10. 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)

Answers:

Question: 01
Answer: c, e
Question: 02
Answer: c
Question: 03
Answer: a
Question: 04
Answer: d
Question: 05
Answer: b, e
Question: 06
Answer: b
Question: 07
Answer: c
Question: 08
Answer: d
Question: 09
Answer: b
Question: 10
Answer: b, c

Note: For any error in Microsoft Technology Associate (MTA) - Introduction to Programming Using Python (98-381) certification exam sample questions, please update us by writing an email on feedback@edusum.com.

Rating: 5 / 5 (75 votes)