You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
election_results.py includes a loop that overwrites a previously declared variable. Script still works but it's a little too confusing for teaching purposes. Change needs to be made below and should be carried over to all elex dirs, branches and tutorial pages to ensure consistency:
forrace_key, cand_resultsinresults.items():
all_votes=0cands= []
# NOTE: below "results" var should be renamed to "row"forcand_key, resultsincand_results.items():
# Populate a new candidate dict using one set of county resultscand= {
'first_name': results[0]['first_name'],
'last_name': results[0]['last_name'],
'party': results[0]['party'],
'winner': '',
}
The text was updated successfully, but these errors were encountered:
election_results.py includes a loop that overwrites a previously declared variable. Script still works but it's a little too confusing for teaching purposes. Change needs to be made below and should be carried over to all elex dirs, branches and tutorial pages to ensure consistency:
The text was updated successfully, but these errors were encountered: