You are tasked with writing an interactive size finder for a T-shirt company. The program should prompt the user for their chest measurement in inches then return the user’s size according to the company’s three size charts: kids, women, and men.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

You are tasked with writing an interactive size finder for a T-shirt company. The program should prompt the user for their chest measurement in inches then return the user’s size according to the company’s three size charts: kids, women, and men.

Input prompt: “Chest measurement in inches: ” You can assume the user will enter a number (rather than a string or boolean).

Inform the user of the sizes that are available as follows (see examples 1 and 2):

Your size choices: Kids size: <size> Womens size: <size> Mens size: <size>

...where <size> is the name of the matching size on the appropriate chart (S, M, L etc.) or “not available” if the chart does not have a matching size for the user. If there are no matching sizes for the user (i.e. all three charts are “not available”), print “Sorry, we don't carry your size” instead of the message above. See example 3 below.

Example input / output # 1 (user input is shown in blue) Chest measurement in inches: 32.5
Your size choices:
Kids size: XL

Womens size: M
Mens size: not available

Example input / output # 2 (user input is shown in blue) Chest measurement in inches: 36
Your size choices:
Kids size: not available

Womens size: XL Mens size: S

Example input / output # 3 (user input is shown in blue) Chest measurement in inches: 22

Sorry, we don’t carry your size

Tip: It should be straightforward to write a program that produces the correct output and passes all tests. However, for full credit, your program must make good use of functions and avoid repeating calculations or comparisons unnecessarily. For example, you should not need to write a separate conditional block for each size chart—consider how you can write one or more functions to handle the logic that is common to all size charts.

Don’t forget to test your functions in test_sizefinder.py!

Next, your program should find the user's size on each of the three size charts. The size charts
are as follows:
Kids
Womens
Mens
Size
Chest (inches)
Size
Chest (inches)
Size
Chest (inches)
S
26 to < 28
S
30 to < 32
S
34 to < 37
M
28 to < 30
M
32 to < 34
37 to < 40
30 to < 32
L
34 to < 36
L
40 to < 43
XL
32 to < 34
XL
36 to < 38
XL
43 to < 47
XXL
34 to < 36
XXL
38 to < 40
XXL
47 to < 50
XXXL
40 to < 42
XXXL
50 to < 53
Transcribed Image Text:Next, your program should find the user's size on each of the three size charts. The size charts are as follows: Kids Womens Mens Size Chest (inches) Size Chest (inches) Size Chest (inches) S 26 to < 28 S 30 to < 32 S 34 to < 37 M 28 to < 30 M 32 to < 34 37 to < 40 30 to < 32 L 34 to < 36 L 40 to < 43 XL 32 to < 34 XL 36 to < 38 XL 43 to < 47 XXL 34 to < 36 XXL 38 to < 40 XXL 47 to < 50 XXXL 40 to < 42 XXXL 50 to < 53
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY