Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views2 pages

MP4A

This document provides instructions for a basic Matlab programming exercise to determine if a given tennis score could result in a finished set based on the rules that a set is over when one player wins 6 games and the other has less than 5, or one wins 7 games if both have at least 5. It includes sample inputs and outputs, and provides a scoring rubric for the exercise focusing on producing the correct output.

Uploaded by

Josh Hukshiam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

MP4A

This document provides instructions for a basic Matlab programming exercise to determine if a given tennis score could result in a finished set based on the rules that a set is over when one player wins 6 games and the other has less than 5, or one wins 7 games if both have at least 5. It includes sample inputs and outputs, and provides a scoring rubric for the exercise focusing on producing the correct output.

Uploaded by

Josh Hukshiam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

 

Basic Matlab Programming 


 
Machine Problem   MP4A  Date   
       
Student Name    Course /Section   
 
Estimated Completion Time: 120 minutes 
File Name: MP4A_Surname 
Problem Statement: 
 
In  tennis,  a  set  is  finished  when  one  of  the  players  wins  6  games  and  the  other  one 
wins  less  than 5, or, if both players win at least 5 games, until one of the players wins 
7 games. 
 
Determine  if  it  is  possible  for  a  tennis  set  to  be  finished  with  the  score  score1: 
score2. 
Sample Output: 
 
1. Input: 
score1: 3 
score2: 6 
Expected Output: true 
 
2. Input: 
score1: 8 
score2: 5 
Expected Output: false 
 
3. Input: 
score1: 6 
score2: 5 
Expected Output: false 
 
 
Laboratory Exercise Score Sheet 
  Criteria  Score 
 
1  Correct Output  50   
 
  Total  50   
 
 
Raymond B. Sedilla   
Instructor 
 

You might also like