Sort by

recency

|

140 Discussions

|

  • + 0 comments

    Here is article related to IOT - Logical Design of IoT

  • + 0 comments

    I found a fun thread about coding challenges on the socialmediagirls forum, and it got me thinking about how simple it can be to sum up odd elements in a list!

  • + 0 comments

    scala = arr.filter(_ % 2 != 0).foldLeft(0)(_ + _)

  • + 0 comments

    def sumofodd(n): a = 0 # Initialize the accumulator for i in range(1, n+1): # Loop through numbers from 1 to n if i % 2 != 0: # Check if the number is odd a += i # Add the odd number to a return a

    b = sumofodd(5) print(b)

  • + 0 comments

    Scala: arr.filter(x => x%2 != 0).sum