Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python help!!! foter eicharactini f inter e character is Imvalut entry. nieate try metin tiner it tharecteri is Firter a thanectiras Wa entrind it corpect

python help!!!
image text in transcribed
image text in transcribed
image text in transcribed
foter eicharactini f inter e character is Imvalut entry. nieate try metin tiner it tharecteri is Firter a thanectiras Wa entrind it corpect ibarattwisi Thars youl. nily thise ietiers. Pre bedse sarple fin. Invalid poticy nleas tre iedini tinker the fovier of ginst rejeher 2 of Findild entry plrist try atath tater the enadef ef gutst Auaber i in thetef the fieder of fust mater a i 9 There an si foests roday. Thank youl El Replace the courit ef total fursti ty the court of make tuecti ind ten coirt od fremale farut seperateh. Hee be low Lamyle rine inter the ferdere of rest nuaber 3 i ale Iovalia eetry. please try deale tater the seober of gurst nutwe i in tated the govite of cuest huebter i i of friter the gonsen at ciest matber 3 in if Anyalda, ectry, please try agafn Enter the cendec of cunst- number 5 in Inter the cender of ruest number of 4 . There hetre 1 feende cursts todid. There zere 2 male roects poday. Tharic youl. Eiveer the gender of guest roncer I I Q there aere no soests today? Thank yeril 3. Enter, the sender af ruitst huntr 11 t Lnten the conder af ruest noaber z I 6 There was one ferale goest todary. thank you? a)? Einter the cender of zuest Autber in of F Eater the zonder af ginst nunkser 2 in 13 Fiter the gender at cievst nametr in i m Fater the gendee of gurst rueter 5 , 9 . There was one fenale guest today? There yery I faje gueits today. e) Modity your code so that it accepts only single characters: if the user enters multiple characters, the program should inform the user that tbhis is an error and not count it as a valid input. The program ends when the user enters" q " or " Q ". See sample run below: Enter a character: T Enter a character: is Invalid entry, please try again Enter a character: A Enter a character: q You entered 2 correct characters. Thank you! f) This code is actually aimed at counting guests at a party based on their gender. Valid inputs are only F,f (for female), M,m (for male) or Q,q (to quit). Modify your code so that it accepts only these letters. See below sample run: Enter the gender of guest number 1 : M Enter the gender of guest number 2:1 Invalid entry, please try again Enter the gender of guest number 2:f Enter the gender of guest number 3 : G Invalid entry, please try again Enter the gender of guest number 3:F Enter the gender of guest number 4:q There were 3 guests today. Thank you! g) Replace the count of total guests by the count of male guests and the count of female guests separately. See below sample run: Ent the gender of guest number 1:m Er the gender of guest number 2 : M Enter the gender of guest number 3 : male Invalid entry, please try again Enter the gender of guest number 3 : F Enter the gender of guest number 4:f Enter the gender of guest number 5 : Ff Invalid entry, please try again Enter the gender of guest number 5 : F Enter the gender of guest number 6:Q There were 3 female guests today. There were 2 male guests today. Thank you! h) Finally, make sure that the display is adequate by displaying a message if there were no guests, and message for males and females separately depending on their numbers also (mind the singular/plural). See below three sample runs: h) Finally, make sure that the display is adequate by displaying a message if there were no guests, and message for males and females separately depending on their numbers also (mind the singular/plural). See below three sample runs: Enter the gender of guest number 1:Q There were no guests today! Thank you! Enter the gender of guest number 1 : F Enter the gender of guest number 2:q There was one female guest today. Thank you! Ent in the gender of guest number 1 : M Enter the gender of guest number 2:m Enter the gender of guest number 3:f Enter the gender of guest number 4 : M Enter the gender of guest number 5:Q There was one female guest today. There were 3 male guests today. Thank you

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_2

Step: 3

blur-text-image_3

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

Explain how leaders are likely to emerge in a leaderless group.

Answered: 1 week ago

Question

A 300N F 30% d 2 m Answered: 1 week ago

Answered: 1 week ago

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago