Question: Create a Python function called sumOfEvens which takes one argument, an integer greater than or equal to 1, and returns the result of adding the
Create a Python function called sumOfEvens which takes one argument, an integer greater than or equal to 1, and returns the result of adding the even integers between 1 and the value of the given argument (inclusive). This function does not print. You may assume that the argument is valid. Here are some examples of how your function should behave: > > > sumOfEvens (1) > > > sumofEvens (2) > > > sumofEvens (3) > > > sumofEvens (4) > > > sumofEvens (5) > > > sumofEvens (6) 12 > > > sumofEvens (101) 2550 > > > sumofEvens (102) 2652 Create a Python function called productofPowersof10 which takes two arguments, both of which are non-negative integers. For purposes of this problem, let's call the first argument exp1 and the second argument exp2. Your function should compute and return (not print) the product of all powers of 10 from 10^exp1to 10^exp2. Here are some examples of how your function should behave: > > > productOfpowersof 10 (0, 0) 1 > > > productOfPowerOf 10 (1, 1) 10 > > > productOfPowerOf 10 (1, 2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
