Read the following code used to calculate the difference in points between basketball Team A and Team B:
scoreA = float(input("What was team A's score?"))
scoreB = float(input("What was team B's score?"))
pointsDifference = scoreA - scoreB
There is an error in the code. Which function should be used, and why?
float(); points require decimals
int(); points are entered as whole numbers
print(); points are printed on scoreboards
str(); points are fixed, so no calculation is necessary