SlideShare uma empresa Scribd logo
1 de 2
CIS/170 - iLab 3 of 7
CLICK HERE TO GET THE SOLUTION !!!!!!!
Part A: Requirements - DIVE Scoring Program
Your mission: The state diving commission wants to computerize the scoring at its diving competitions.
You’ve been hired to write a program to automate the scoring of dives. Following are the requirements for
the program.
After each dive, the user will be prompted to enter the:
 diver’s name;
 diver’s city;
 degree of difficulty (ranges from 1.00 to 1.67); and
 scores from five judges (scores can range from 0 to 10).
If an invalid score is entered, an error message will be displayed. The user will be prompted for the score
repeatedly until a valid score is entered.
The program will then display the following information:
 Diver’s name
 Diver’s city
 Dive final score: This is calculated by dropping the highest and lowest of the five judges’ scores. The
remaining three scores are added together, and the result is divided by 3 and then multiplied by the
degree of difficulty.
The program will then prompt the user if she/he wants to process another dive. The user can type “Y” or
“y” to continue, and ”N” or “n” to quit.
Sample output:
Diver’s name: Sue Jones
Diver’s city: Dallas
Dive degree of difficulty: 1.9
Invalid degree of difficulty – Please reenter (Valid Range: 1 – 1.67)
Dive degree of difficulty: 2
Invalid degree of difficulty – Please reenter (Valid Range: 1 – 1.67)
Dive degree of difficulty: 1.2
Judge #1 score: 45
Invalid score – Please reenter (Valid Range: 0 – 10)
Judge #1 score: 3
Judge #2 score: 4.5
Judge #3 score 6.7
Judge #4 score 89
Invalid score – Please reenter (Valid Range: 0 – 10)
Judge #4 score 8
Judge #5 score: 9.2
Diver: Sue Jones
City: Dallas
Dive score: 7.68
Do you want to process another dive (Y/N)? y
Diver’s name: Dave Smith
Diver’s city: Houston
Dive degree of difficulty: 1.1
Judge #1 score: 5.7
Judge #2 score: 6.8
Judge #3 score:: 7.6
Judge #4 score: 8.7
Judge #5 score: 6.7
Diver: Dave Smith
City: Houston
Dive score: 7.74
Do you want to process another diver (Y/N)? N
Tips
Pseudocode: Although there are several valid ways to write the program, the following is an outline of
one way to design the overall logic.
Declare and initialize variables: name, city, judge score, highest score, lowest score, total score
Loop while there are dives to process
 Get diver’s name and city
 Get degree of difficulty
 Loop to validate input
 End Loop
Loop five times to get judges’ scores
 Loop to Validate input
 End Loop
 Update highest and lowest scores if need be
 Add score to total score
End Loop Calculate the final score (subtract highest and lowest scores from total score, divide by
3, multiply by degree of difficulty) Display the diver’s information and final dive score Prompt the user if
he or she wants to process another dive
 End-Loop

Screenshot 1
CLICK HERE TO GET THE SOLUTION !!!!!!!

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Cis 170 ilab 3 of 7

  • 1. CIS/170 - iLab 3 of 7 CLICK HERE TO GET THE SOLUTION !!!!!!! Part A: Requirements - DIVE Scoring Program Your mission: The state diving commission wants to computerize the scoring at its diving competitions. You’ve been hired to write a program to automate the scoring of dives. Following are the requirements for the program. After each dive, the user will be prompted to enter the:  diver’s name;  diver’s city;  degree of difficulty (ranges from 1.00 to 1.67); and  scores from five judges (scores can range from 0 to 10). If an invalid score is entered, an error message will be displayed. The user will be prompted for the score repeatedly until a valid score is entered. The program will then display the following information:  Diver’s name  Diver’s city  Dive final score: This is calculated by dropping the highest and lowest of the five judges’ scores. The remaining three scores are added together, and the result is divided by 3 and then multiplied by the degree of difficulty. The program will then prompt the user if she/he wants to process another dive. The user can type “Y” or “y” to continue, and ”N” or “n” to quit. Sample output: Diver’s name: Sue Jones Diver’s city: Dallas Dive degree of difficulty: 1.9 Invalid degree of difficulty – Please reenter (Valid Range: 1 – 1.67) Dive degree of difficulty: 2 Invalid degree of difficulty – Please reenter (Valid Range: 1 – 1.67) Dive degree of difficulty: 1.2 Judge #1 score: 45 Invalid score – Please reenter (Valid Range: 0 – 10) Judge #1 score: 3 Judge #2 score: 4.5 Judge #3 score 6.7 Judge #4 score 89 Invalid score – Please reenter (Valid Range: 0 – 10) Judge #4 score 8 Judge #5 score: 9.2
  • 2. Diver: Sue Jones City: Dallas Dive score: 7.68 Do you want to process another dive (Y/N)? y Diver’s name: Dave Smith Diver’s city: Houston Dive degree of difficulty: 1.1 Judge #1 score: 5.7 Judge #2 score: 6.8 Judge #3 score:: 7.6 Judge #4 score: 8.7 Judge #5 score: 6.7 Diver: Dave Smith City: Houston Dive score: 7.74 Do you want to process another diver (Y/N)? N Tips Pseudocode: Although there are several valid ways to write the program, the following is an outline of one way to design the overall logic. Declare and initialize variables: name, city, judge score, highest score, lowest score, total score Loop while there are dives to process  Get diver’s name and city  Get degree of difficulty  Loop to validate input  End Loop Loop five times to get judges’ scores  Loop to Validate input  End Loop  Update highest and lowest scores if need be  Add score to total score End Loop Calculate the final score (subtract highest and lowest scores from total score, divide by 3, multiply by degree of difficulty) Display the diver’s information and final dive score Prompt the user if he or she wants to process another dive  End-Loop  Screenshot 1 CLICK HERE TO GET THE SOLUTION !!!!!!!