ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Can you please Test and debug the program below using the following specifications?

by | Nov 28, 2023 | engineering

Can you please Test and debug the program below using the following specifications? Many thanks!

Provide a list of valid entries and the correct results for each set of entries. Then, make sure that the results are correct when you test with these entries.

Provide a list of invalid entries. These should include entries that test the limits of the allowable values. Then, handle the invalid integers (such as negative integers and unreasonably large integers). In addition, make sure the user can’t enter data that doesn’t make sense (such as a player having more hits than at bats).

Don’t attempt to handle invalid entries that cause exceptions, such as the user entering a string like “x” for an integer value. You can do that after you read chapter 8.

Tip: whenever needed please provide screenshots of your debugging. Thorough Test Plan also would be a BIG plus.

def display_menu():

  print(“+”*50)

  print(” ttBaseball Team Manager”)

  print(“MENU OPTIONS”)

  print(“1 – Calculate batting average.”)

  print(“2 – Exit program.”)

  print(“+”*50)

def convertBat():

  print(“Calculate batting average.”)

  num_at_bats = int(input(“Enter official number of at bats: “))

  num_hits = int(input(“Enter number of hits: “))

  average = num_hits/num_at_bats

  print(“Batting average:”, round(average,3))

def main():

  while True:

    display_menu()

    rk = int(input(“Menu Option : “))

    if (rk == 1):

      convertBat()

    elif(rk == 2):

      break

    else:

      print(“Not a valid option. Please try again.”)

  print(“Bye!”)

main()

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!