1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Verdich [7]
3 years ago
10

The fractional_part function divides the numerator by the denominator, and returns just the fractional part.

Computers and Technology
1 answer:
Alinara [238K]3 years ago
6 0

Answer:

a. True

Explanation:

The fractional_part function divides the numerator by the denominator, and in turn returns just the fractional part, which is usually a number between 0 and 1.

When the denominator is 0, it produces an error result, instead of attempting the division, the function can be programmed to return "Math Error: cannot be divided by zero", as shown in the following Python code;

def fractional_part(numerator, denominator):

if denominator == 0:

 return "Math Error: cannot be divided by zero"

return (numerator % denominator)/denominator

You might be interested in
"Create a Python program named detect_column_level_data_entry_errors. When complete, you will run this program to produce a diag
11111nata11111 [884]

Answer:

See explaination

Explanation:

Code for detect_column_level_data_entry_errors.py:

# File: detect_column_level_data_entry_errors.py

# The program will produce a diagnostic report that shows data entry errors that cause column

# totals in the data to be out of balance. Will need to fix cleaned_data.txt until errors resolved.

def main():

input_filename = input('Please enter the input filename: ')

infile = open(input_filename, 'r', encoding='utf8')

total_males = 0

total_females = 0

sum_total = 0

print('\n{0:^40}'.format('Column-Level Data Entry Errors'))

print('\n{0:<10}{1:>10}{2:>10}{3:>10}'.format(

'Age Group', 'Males', 'Females', 'Total'))

for line in infile:

age_group, males, females, total = line.split()

males = int(males)

females = int(females)

total = int(total)

print('{0:<10}{1:>10,}{2:>10,}{3:>10,}'.format(

age_group, males, females, total))

if age_group != 'Total':

total_males = males + total_males

total_females = females + total_females

sum_total = total + sum_total

else:

print('{0:<10}{1:>10,}{2:>10,}{3:>10,}'.format(

'Error', (males-total_males), (females-total_females), (total-sum_total)))

infile.close()

main()

8 0
3 years ago
A gamer typing their name into the computer is an example of:
vova2212 [387]

user input I think I'm not sure though

3 0
3 years ago
Read 2 more answers
Select the true statement about the motherboard.
Nata [24]

Answer:

it executes the commands sent to it by the applica software .

8 0
2 years ago
Which of these is a popular format for citing sources in academic Works RAM APA CPU or EDU
Lelechka [254]

Answer:

APA

Explanation:

6 0
3 years ago
In this screenshot, the circled item is the
gavmur [86]

Answer:

Favorites tab/bar

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • A local area network works as a ____ network in that clusters of workstations are connected to a central point (hub or switch) t
    6·1 answer
  • You've decided to use a subnet mask of 255.255.192.0 with your 172.17.0.0 network to create four separate subnets. The network I
    13·1 answer
  • When a workforce scheduling problems is formulated as an integer programming model, it has:?
    6·1 answer
  • Write a java program which uses methods for calculating the sum of any 5 non-zero integer digits that are input. The program mus
    8·1 answer
  • What includes two or more private, public, or community clouds, but each cloud remains separate and is only linked by technology
    7·1 answer
  • True or false: when an ospf route sends its link state information, it is sent only to those nodes directly attached neighbors.
    14·1 answer
  • What is the code for this please?​
    13·1 answer
  • In cell K8, create a formula using the SUM function that calculates the total of range D17:D20 and subtracts it from the value i
    7·1 answer
  • Which of the following is not the disadvantage of closed
    7·2 answers
  • Help me please. I dont really understand this.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!