98-381 Premium Bundle

98-381 Premium Bundle

Introduction to Programming Using Python Certification Exam

4.5 
(49530 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 23, 2024Last update

Microsoft 98-381 Free Practice Questions

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

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

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

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
b = (-a)**2

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

  • A. Mastered
  • B. Not Mastered

Answer: A

Explanation:
References: http://effbot.org/zone/python-with-statement.htm

NEW QUESTION 7
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 8
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 9
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 10
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 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
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 13
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 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
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 16
......

100% Valid and Newest Version 98-381 Questions & Answers shared by Certifytools, Get Full Dumps HERE: https://www.certifytools.com/98-381-exam.html (New 40 Q&As)


START 98-381 EXAM