Ask Question

This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?

number1=10

number2=20

number3=30

sum=number1+number2+number3

print ("Number1 is equal to ", number1)

print ("Number2 is equal to ", number2)

print ("Number3 is equal to ", number3)

print ("The sum is ", sum)

Line a

Line b

+4
Answers (2)
  1. 27 November, 02:38
    0
    The Proper codes in Line a and Line b is given below

    average=Sum/3

    print (" Average is = ", average)

    Explanation:

    In the given question it calculated the sum but the program does not calculate the average of the 3 numbers. The average of the 3 number is calculated by using average=Sum/3 statement so we add this code in Line a then After that print the value of average by using the print function so we add this code in Line b.
  2. 27 November, 02:40
    0
    The codes in line A and line B are given below:

    average=sum divided by 3
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “This program finds the sum and average of three numbers. What are the proper codes for Lines a and b? number1=10 number2=20 number3=30 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers