0

What is the output of this code?. I need help

You need to calculate the points earned by a soccer team. The team won 18 games and ended 7 games as a draw. A win brings 3 points, while a draw brings 1. Create a program to calculate and output the total points earned by the team.

3rd Jan 2022, 1:34 PM
Samuel Adesanya
5 Answers
+ 1
Hello Samuel Adesanya Please show us your attempt so that we can help you.
3rd Jan 2022, 2:09 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
print (3 * 18) print (1 * 7) print ((3 * 18)+7) This was my attempt but I was wrong. Please do something to help
3rd Jan 2022, 7:26 PM
Samuel Adesanya
0
Wouldn't that program always print 61 tho, If the wins are always 18 and the draws always 7 ?
3rd Jan 2022, 2:29 PM
darkorbit17493
darkorbit17493 - avatar
0
This is going to print "54761". And I'm guessing in your case it needs to print "61" only.
3rd Jan 2022, 8:00 PM
darkorbit17493
darkorbit17493 - avatar
0
Samuel Adesanya The first two print statements are not necessary because you only need to print the result. print(3*18+7)
4th Jan 2022, 4:39 PM
Denise Roßberg
Denise Roßberg - avatar