Pass4itsure > Microsoft > Microsoft Certifications > 98-381 > 98-381 Online Practice Questions and Answers

98-381 Online Practice Questions and Answers

Questions 4

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.

Select and Place:

Buy Now
Questions 5

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.

Select and Place:

Buy Now
Questions 6

DRAG DROP

You are writing a Python program to perform arithmetic operations.

You create the following code:

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.

Select and Place:

Buy Now
Questions 7

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.

Hot Area:

Buy Now
Questions 8

HOTSPOT

You create the following program to locate a conference room and display the room name. Line numbers are included for reference only.

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.

Hot Area:

Buy Now
Questions 9

HOTSPOT

You are developing a Python application for your company.

You write the following code:

Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.

Hot Area:

Buy Now
Questions 10

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.

Hot Area:

Buy Now
Questions 11

HOTSPOT

You create a function to calculate the power of a number by using Python.

You need to ensure that the function is documented with comments.

You create the following code. Line numbers are included for reference only.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

Hot Area:

Buy Now
Questions 12

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.

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!")

Buy Now
Questions 13

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)

Buy Now
Exam Code: 98-381
Exam Name: Introduction to Programming Using Python
Last Update: Jan 15, 2025
Questions: 40
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99