answer.
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
dimaraw [331]
2 years ago
6

Write a program that asks the user for the number of males and the number of females registered in a class using two separate in

puts ("Enter number of males:", "Enter number of females:"). The program should display the percentage of males and females (round to the nearest whole number) in the following format:
Percent males: 35%
Percent females: 65%

Use string formatting.
Computers and Technology
1 answer:
bagirrra123 [75]2 years ago
6 0

Answer:

males_num=int(input("Enter the number of males\n"))#taking input of the males_num

female_num=int(input("Enter the number of females\n"))#taking input of the female_num

percentage_male=(males_num/(males_num+female_num))*100#calculating the percentage.

print("Percent males: "+str(percentage_male)+"%")#printing the male percentage.

print("Percent females: "+str(100-percentage_male)+"%")#printing the female percentage.

Enter the number of males

21

Enter the number of females

45

Percent males: 31.818181818181817%

Percent females: 68.18181818181819%

Explanation:

The above written code is in python.I have first taken input of the number of males then input of the number of males after that calculating the male percentage in the class.Then calculating the percentage of female students by subtracting the male percentage form 100 that's how we  will get the respective percentages then printing the percentages.

You might be interested in
Which command backs up the single database called 'websites' to the file 'websites_backup.sql'?
kaheart [24]

Answer:

(d) mysqldump websites -u root -p > websites_backup.sql

Explanation:

To create a backup mysqldump is used.It is a data backup program.This program was originally written by Igor Romanenko. It creates a backup of file name websites_backup.sql.

So among the given options in the question option d is the correct option which backs up the single database websites in the file website_backup.sql.

8 0
2 years ago
A large industrial machine is able to monitor environmental conditions and quickly shut down and sound an alarm when it detects
Tamiku [17]

The feature of technology that allows this to happen is d. reduced latency.

Latency is the amount of time it takes for data to be transmitted in a network. Reduced latency therefore refers to a situation where data is transmitted with speed.

Reduced latency allows:

  • better communication
  • reduced lag and,
  • better gaming

The machine in question is only able to quickly sound the alarm because it has low latency.

In conclusion, we can say that low latency enables the machine above to sound the alarm quickly which means that low latency is important to the safety of that environment.

<em>Find out more at brainly.com/question/9337524.</em>

Options for this question include:

a. improved bandwidth

b. connection density

c. effective range

d. reduced latency

6 0
2 years ago
Read 2 more answers
The fractional_part function divides the numerator by the denominator, and returns just the fractional part (a number between 0
7nadin3 [17]

Answer:

part a

Explanation:

7 0
2 years ago
I need help asap please :) I will mark brainliest for whoever gets the right answer! x
Nina [5.8K]

1.) Average

2.) Ascending

Using this would give an average score for each team, when using the Average function, you use scores from many different games to not be biased, and it gives an accurate description of the teams scores and it's a fair way to find where they stand in respect tot he other team.

4 0
2 years ago
6. A small design agency you are consulting for will be creating client websites and wants to purchase a web server so they can
Novay_Z [31]

Answer:

Explanation:

The best way to advise the agency in this matter would be to help them completely understand the total cost of ownership of the server. This includes the server itself but many other factors as well. Such as any and all server software and application software that they will need, an IT server manager, facility costs, security costs, backup features. These are some of the main costs that they will be incurring but there may be more unforeseen costs. Therefore the best way to advise them is by providing all of this information so that they can make the most informed decision possible.

3 0
2 years ago
Other questions:
  • Mellissa wants to pursue a career in database administration. Select the requirements needed to achieve this.
    9·2 answers
  • Technician A says that the excessive length of a heater hose is intended to protect the heater core from undue stress. Technicia
    5·1 answer
  • Nick won a $1,000 lottery prize. He can't decide what he should spend the money on. For some time now, he has been planning to b
    5·1 answer
  • This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?
    6·2 answers
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • Thelma is a web developer for a bowling league. She wants visitors to the website to be able to print web pages, such as league
    14·1 answer
  • Monica needs a printer to use at home. She wants fine-quality prints at an affordable cost. Which printer will help her achieve
    9·1 answer
  • Write a program that plays a reverse guessing game with the user. The user thinks of a number between 1 and 10, and the computer
    5·1 answer
  • Stan’s assignment is to print a three-dimensional image on a piece of paper. Which printing technique should he use?
    14·2 answers
  • Most ________ are accompanied by several common utility programs, including a search program, a storage management program, and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!