id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

cse160-staff@cs.washington.edu cse160_21au_checkin01 > sum_odds
prev  |  next  |  chance

Return the sum of the odd ints in the given list. Note: the % "mod" operator computes the remainder, e.g. 5 % 2 is 1.


sum_odds([5, 2, 6, 3, 4]) → 8
sum_odds([3, 6, 11, 2, 5]) → 19
sum_odds([]) → 0

...Save, Compile, Run (ctrl-enter)

def sum_odds(nums):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Post-solution available

Copyright Nick Parlante 2017 - privacy