+ 3
I'm new here. How to write this? No Idea.
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.
9 Antworten
+ 8
Create a variable "score". Now calculate the total score((winning point x number of win)+(draw points x number of draws)). Then store the value in the variable. Done, simple. Try it and say it it worked. All the best =)
+ 3
18*3 + 7*1
18 wins @ 3 point each
7 draws @ 1 point each
See if you can print the result
Review lesson 3.1 of the Python for Beginners tutorial
+ 3
Okay, thanks. 😁
+ 2
Jeffrey Lee
Well done
🖐😀👍
+ 2
Thanks.
+ 2
print(18*3+7)
+ 2
It is done in a simpler way:--
games = 18
dr_games = 7
total = (games) * 3 + dr_games
print("total points :-- " , total)
+ 1
Thanks. I will give it a shot.
0
I made it!! Thanks