write my assignment 18067
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.
print(” ttBaseball Team Manager”)
print(“1 – Calculate batting average.”)
print(“2 – Exit program.”)
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))
rk = int(input(“Menu Option : “))
if (rk == 1):
elif(rk == 2):
print(“Not a valid option. Please try again.”)