Question: Assignment #6 - Functions You are responsible for reading and understanding the requirements listed below. Task #1 - Who is the best! Create a program

 Assignment #6 - Functions You are responsible for reading and understanding

Assignment #6 - Functions You are responsible for reading and understanding the requirements listed below. Task #1 - Who is the best! Create a program that will perform the following. It will ask the user for the first player's score and then ask for the second player's score. It will then use this information to display what player had the highest score and what the difference between the two scores were. You code must include the following: Build a function named score Difference() that will take two parameters player l's score and player2's score. The function will then use the min and/or max function be sure that it is subtracting the higher value from the lower value, or use abs() function to get the positive value. The difference will then be returned. Task #2 - Wanna play a game? We want to create a short program that performs the following task. A user is asked if they would like to play a game. If they answer y, yes, Yes or any other variation of the word (starting with a Y) - we will print to the screen "Hooray! So glad to be playing a game with you!". If they answer n, no, No or any other variation of the word No (starting with an N), then we will display to the screen "Sorry that you don't want to play with me :( ". If they enter any other value, we display "Sorry- didn't get that - please enter your choice again" and they will be prompted to run the program once more. Your code must include the following: tolowerCase function, a loop and the substr function Standard comments are included in your file. Submit an electronic version using the submission point located in the week 7 folder. The electronic version MUST be in html format. Any other format will NOT be accepted and you will receive a zero mark for your assignment. Keep it simple - do not do more than what was asked You may only use what we have learned in class to this point. . Assignment #6 - Functions You are responsible for reading and understanding the requirements listed below. Task #1 - Who is the best! Create a program that will perform the following. It will ask the user for the first player's score and then ask for the second player's score. It will then use this information to display what player had the highest score and what the difference between the two scores were. You code must include the following: Build a function named score Difference() that will take two parameters player l's score and player2's score. The function will then use the min and/or max function be sure that it is subtracting the higher value from the lower value, or use abs() function to get the positive value. The difference will then be returned. Task #2 - Wanna play a game? We want to create a short program that performs the following task. A user is asked if they would like to play a game. If they answer y, yes, Yes or any other variation of the word (starting with a Y) - we will print to the screen "Hooray! So glad to be playing a game with you!". If they answer n, no, No or any other variation of the word No (starting with an N), then we will display to the screen "Sorry that you don't want to play with me :( ". If they enter any other value, we display "Sorry- didn't get that - please enter your choice again" and they will be prompted to run the program once more. Your code must include the following: tolowerCase function, a loop and the substr function Standard comments are included in your file. Submit an electronic version using the submission point located in the week 7 folder. The electronic version MUST be in html format. Any other format will NOT be accepted and you will receive a zero mark for your assignment. Keep it simple - do not do more than what was asked You may only use what we have learned in class to this point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!