I have used jupyter notebook, python 3, to solve your problem:
------------------------Code with comments--------------------------------------
# function
def sum_odd(number1,number2):
# declaring variable to calculate sum of odd numbers and
initialised with zero
oddSum = 0
# looping from number1 to number2 using range function
# second argument not included in range function
# (loop)
for i in range(number1,number2+1):
# checking the number "i" is even or odd, if odd then this
condition is true
# (decision structure)
if i%2 == 1:
# adding "i" to oddSum variable
oddSum = oddSum + i
# returning the oddSum as it contains the sum of odd numbers in the
range of number1 and number2
# both are included
# (returning final sum)
return oddSum
sum = sum_odd(0,5)
print(f"Sum of odd numbers is {sum}")
----------------------Code Ends----------------------------------
Code Images:

-------Some outputs------------------------


Python 1 Write a function called sum_odd that takes two parameters, then calculates and returns the...
python Write a function called has_odd_even that takes three integers as parameters and that returns True if there is at least one odd and at least one even among the three numbers and that returns False otherwise. Below are some sample calls and the appropriate value to return. Function call Value returned has_odd_even(2, 4, 6) False has_odd_even(2, 3, 4) True has_odd_even(12, 4, 17) True has_odd_even(5, 17, 4) True has_odd_even(14, 7, 5) True has_odd_even(5, 4, 2) True has_odd_even(13, 20, 91) True...
Write a function in the C++called summary that takes as its parameters an input and output file. The function should read two integers find the sum of even numbers, the sum of odd numbers, and the cumulative product between two values lower and upper. The function should return the sum of even, odd, ad cumulative product between the lower and upper values. Please write program in C++.
With using Python . Write a function that: 1. Takes two arguments and returns the product of the arguments. The return value should be of type integer. 2. Takes two arguments and returns the quotient of the arguments. The return value should be of type float. 3. Takes one argument and squares the argument. It then uses the two values and returns the product of the two arguments.(Reuse function in 1.) 4. Takes one argument and prints the argument. Use...
1. use python List to Dictionary Write a function that has three parameters: a list of unsorted numbers with no duplicates, a start number, and an end number. This function should return a dictionary with all integers between the start and end number (inclusive) as the keys and their respective indices in the list as the value. If the integer is not in the list, the corresponding value would be None. Example unsorted list: [2,1,10,0,4,3] two numbers: 3, 10 returned...
Make a public class called ManyExamples and in the class... Write a function named isEven which takes in a single int parameter and returns a boolean. This function should return true if the given int parameter is an even number and false if the parameter is odd. Write a function named close10 which takes two int parameters and returns an int. This function should return whichever parameter value is nearest to the value 10. It should return 0 in the...
Problem 1. Write a Python function times_i_at_odd(L) that takes as arguments a list L and returns a list consisting of the elements of L multiplied by the index number of the element at odd positions. (Use list comprehensions) >>> times_i_at_odd([1,2,3,4,5,6,7,8,9,10]) [2, 12, 30, 56, 90] Problem 2. Write a recursive function sum_cols(grid, n) that takes a list of lists of integers grid and integer n and returns the sum of column n in grid. For example, the call sum_cols([[1,2,3,4], [10,20,30,40],...
Problem 5 in python, write a function called sequencelength that accepts two input arguments: a list of integers (called mylist here) and an integer (called x here). The function should return True if mylist contains an increasing sequence with a length of at least x values. Otherwise, the function should return False. An increasing sequence of numbers is one in which each number is larger than the one before it. For example, [4, 8, 13, 14, 21] is an increasing...
PYTHON The function longest that returns the longest of two strings. The function count_over that takes a list of numbers and an integer nand returns the count of the numbers that are over n. The function bmi that takes two parameters height and weight and returns the value of the body mass index: a person's weight in kg divided by the square of their height in meters. def longest(string1, string2): """Return the longest string from the two arguments, if the...
Write a Python function called string_times that takes two parameters: a string and a number, and prints output in the following format: • string_times('Hi', 2) → 'HiHi' • string_times('Hi', 3) → 'HiHiHi' You MUST use a while loop in your solution.
Using Java: 1. Recursive Multiplication Write a recursive function that accepts two arguments into the parameters x and y. The function should return the value of x times y. Remember, multiplication can be performed as repeated addition as follows: 5×6=6+6+6+6+6 2. Recursive findings Write a recursive boolean method named reFinding. The method should search an array for a specified value, and return true if the value is found in the array, or false if the value is not found in...