Count the Votes
Python
15 pts
Count the Votes
The class voted for a class leader. Every vote is in the tuple votes.
- Create
selam_votes— how many times"Selam"appears (usecount()). - Create
first_abel— the index of the first vote for"Abel"(useindex()). - Print both variables.
Expected output:
3 1
Checklist
- Keep
votesunchanged and createselam_voteswithcount(). - Create
first_abelwithindex(). - Print both variables.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
