Вопрос о суммировании в python 3
Здравствуйте. Пишу программу для игры в 21. Написал генератор. Теперь надо суммировать значения всех карт, которые были выданы. Не могу понять как. Можно ли суммировать value из разных функций и как?
1. Create card generator as a function.
2. Create a game that generate and display 2 cards for the player.
3. Add and display cards and total value
4. Generate 2 card for the dealer and display the last one
5. Ask player if want to hit or stand.
6. While player choose hit it generates an other random card, add value to total and display it.
7. If the user stands add the value of the cards and display it.
8. If the user pass 21 display "user lose" and ask if play again.
9. If the user stands, Dealer hits until the value of his cards is greater than 16
10. Check who wins and congratulate or commiserate player.
11. Ask user if want to play again.
12. Use appropriate variable names data types, use casting.
13. Use arrays
14. Use random library commands: randint() and choice()
15. Add comments and good GUI.