2B PROGRAMSExcellence (6 points): Complete GoneBananas2.0, BaseballStats, and PythThm within 50 hours. All coding standards are demonstrated throughout all programs.
Advanced (5 points): Complete GoneBananas2.0 and BaseballStats OR PythThm within 50 hours, and have the third program completed by the end of Cycle 2. All coding standards are demonstrated throughout all programs. Proficient (4 points): Complete GoneBananas2.0, BaseballStats, and PythThm by the end of Cycle 2. All coding standards are demonstrated throughout all programs. Basic (3 points): Complete GoneBananas2.0 and BaseballStats by the end of Cycle 2. Below Basic (2 points): Complete GoneBananas2.0 by the end of Cycle 2. |
|
GoneBananas2.0
Open your existing GoneBananas program and change the version number to 2.0. You will be updating and improving this program, so do not create a new program file.
Change the output phase of the program to be in a right-aligned three-column table. The column headers are "Cluster Size", "# of Clusters", and "Left Over". Show each of the results in five rows in the table. Note: You no longer need any of the old labels from GoneBananas1.0.
TEST DATA:
Input = 100 Bananas
Output
Open your existing GoneBananas program and change the version number to 2.0. You will be updating and improving this program, so do not create a new program file.
Change the output phase of the program to be in a right-aligned three-column table. The column headers are "Cluster Size", "# of Clusters", and "Left Over". Show each of the results in five rows in the table. Note: You no longer need any of the old labels from GoneBananas1.0.
TEST DATA:
Input = 100 Bananas
Output
BaseballStats
First, reference the following two links to learn a little bit about the baseball statistics known as batting average and slugging percentage. Slugging percentage is similar to batting average, but adds in a factor to determine which players hit for "power". A power hitter is more prone to extra base hits like doubles, triples, and home runs).
Write a program that will ask for six inputs for three players. These inputs include:
In the background, first calculate and store how many singles (1B) the player had. This is relatively straightforward--take the number of hits and subtract the number of doubles, triples, and home runs from that value.
Next, calculate and store the batting average (BA) and slugging percentage (SLG) for each player. Reference the links above for the proper formulas.
Output a table for including all three players that shows all of the following statistics in this order: Name, At-Bats, Hits, Singles, Doubles, Triples, Home Runs, Batting Average, and Slugging Percentage.
It must include a header row that includes abbreviated titles for all of the columns. Batting average and slugging percentage are expressed to three decimal places, such as 0.323 or 0.647.
TEST DATA: Use any three players from my favorite team, the 2008 Philadelphia Phillies.
First, reference the following two links to learn a little bit about the baseball statistics known as batting average and slugging percentage. Slugging percentage is similar to batting average, but adds in a factor to determine which players hit for "power". A power hitter is more prone to extra base hits like doubles, triples, and home runs).
Write a program that will ask for six inputs for three players. These inputs include:
- Name (First and Last)
- At-Bats (AB)
- Hits (H)
- Doubles (2B)
- Triples (3B)
- Home Runs (HR)
In the background, first calculate and store how many singles (1B) the player had. This is relatively straightforward--take the number of hits and subtract the number of doubles, triples, and home runs from that value.
Next, calculate and store the batting average (BA) and slugging percentage (SLG) for each player. Reference the links above for the proper formulas.
Output a table for including all three players that shows all of the following statistics in this order: Name, At-Bats, Hits, Singles, Doubles, Triples, Home Runs, Batting Average, and Slugging Percentage.
It must include a header row that includes abbreviated titles for all of the columns. Batting average and slugging percentage are expressed to three decimal places, such as 0.323 or 0.647.
TEST DATA: Use any three players from my favorite team, the 2008 Philadelphia Phillies.
PythThm
Write a program that solves Pythagorean Theorem and shows the user’s work. The program should read in the lengths of two legs of a right triangle and output the length of the hypotenuse. Information on Pythagorean Theorem can be found here.
Your program needs to be extremely user-friendly. In addition to outputting the length of the hypotenuse, you should also “show your work” to the user—exactly like it is shown to the right. Your program should use real numbers always rounded to 2 decimal places. It will look slightly different than the image here (25.00 instead of 25).
SPECIAL CHARACTERS:
To get the squared symbol, place this in your writeln statement (outside of quotes, like you would a variable): chr(253)
To get the square root symbol, place this: chr(251)
TEST DATA: Use the image at right. All of the work shown there should be shown in your program.
Write a program that solves Pythagorean Theorem and shows the user’s work. The program should read in the lengths of two legs of a right triangle and output the length of the hypotenuse. Information on Pythagorean Theorem can be found here.
Your program needs to be extremely user-friendly. In addition to outputting the length of the hypotenuse, you should also “show your work” to the user—exactly like it is shown to the right. Your program should use real numbers always rounded to 2 decimal places. It will look slightly different than the image here (25.00 instead of 25).
SPECIAL CHARACTERS:
To get the squared symbol, place this in your writeln statement (outside of quotes, like you would a variable): chr(253)
To get the square root symbol, place this: chr(251)
TEST DATA: Use the image at right. All of the work shown there should be shown in your program.
ABC: Quagga (+2)
This was the opening program at the 2016 Bloomsburg Computer Programming Competition. You have the knowledge to do it!
This was the opening program at the 2016 Bloomsburg Computer Programming Competition. You have the knowledge to do it!