Question: in python Python - Range1 Define a function called 'rangefunction which takes three parameters. The first parameter is 'startvalue, the next parameter is 'endvalue and

Python - Range1 Define a function called 'rangefunction which takes three parameters. The first parameter is 'startvalue, the next parameter is 'endvalue and the last parameter is 'stepvalue. The function definition code stub is given in the editor. Generate the squares of numbers from startvalue' to 'endvalue' using range based on condition given below: Print the values which must be separated by tab spaces. Note: startvalue and endvolue both are inclusive in the range. Constraints . 1 startvalue Input Format for Custom Testing in the first line stortvalue given In the second line endvalue given In the second line stepvalue given Sample Case 0 Sample Input STOIN 2 9 2 Sample Output 16 Function startvalue - 2 endvalue 9 stepvalue 2 36 64 xplanation With 2 as startvalue to 9 as endvalue and with 2 as stepvalue the output is 2468 Python 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1999 17 18 #1/bin/python3 import math import os import random 26 27 28 29 30 import re import sys 31 32 33 # # Complete the func function below. # 21 def rangefunction (startvalue, endvalue, stepvalue) 22 #Write your code here 23 24 if 25 # The function is expected to print an INTEGER. # The function accepts following parameters: N 1. INTEGER startvalue # 2. INTEGER endvalue # 3. INTEGER stepvalue # Autocomplete Disabled name. __main__ x = int(input().strip()) y int(input().strip()) z = int(input().strip()) Test Results rangefunction(x, y, z) Custom Input
Step by Step Solution
3.40 Rating (150 Votes )
There are 3 Steps involved in it
Python version 36 Python program to create and implement rangefuncti... View full answer
Get step-by-step solutions from verified subject matter experts
