Way you can start is to split your exercise into logical parts and use google (or SO search) to solve each part.
For example,
Create a function in Python named vote_pourcentage which takes as input a string and counts the number of yes and no in this chain .
“python create function”:
How to define and call function
“python count in string”:
Count number of occurrences of a given substring in a string
There It should return the percentage of yes from all yes and no , not
counting abstentions in the string.
“python count percentage”:
Calculate Percentage
and so on.