Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

B-E ab 6: atol.cs.rntsuedu/iabs/1170/HTML-python/Lab6.PE1.html write a complete python program including minimal comments file name, your name, and problem description solves the following problem in the

image text in transcribed
B-E ab 6: atol.cs.rntsuedu/iabs/1170/HTML-python/Lab6.PE1.html write a complete python program including minimal comments file name, your name, and problem description solves the following problem in the main function: that . Problem Specification: Write a program that asks the user for the number of males and the number of females registered in a class using two separate inputs (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. sample run #1: Enter number of males: 150 Enter number of females: 250 Percent males: 38% Percent females: 62% sample run #2 : Enter number of males: 75 Enter number of females: 25 Percent males: 75% percent females : 25% Sample run #3: Enter number of males: Enter number of females: 35 Percent males: es Percent fenales: 1ee Sample run #4 : Enter number of males: 1560 Enter number of fenales: e percent males: 100% Percent females: x. Notes: You should use the format function and use % format specifier. Keep in mind if multiple arguments are passed to the print function, they are automatically separated by a space when they are displayed on the screen. To solve the above problem in the main function: 1. At the top of the program, you should have a function heading of main as following: def main)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

Writing a Strong Introduction

Answered: 1 week ago