Welcome to Westonci.ca, the place where your questions find answers from a community of knowledgeable experts. Explore a wealth of knowledge from professionals across various disciplines on our comprehensive Q&A platform. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

Read the following code, written to calculate an average:


def main():

num1 = 85

num2 = 95

num3 = 91


average = num1 + num2 + num3 / 3

print("Average: " + str(average))

main()


Which line of code has an error and why? (5 points)


A average = num1 + num2 + num3 / 3; It does not use quotation marks to indicate the string literal.

B average = num1 + num2 + num3 / 3; It does not follow the proper order of operations.

C print("Average: "str(average)); It requires an equal sign to properly calculate the output.

D print("Average: "str(average)); It requires a float() function to properly display the output