Computer Science, asked by satyapc7081, 9 months ago

Write a simple python function to generate a series of floating-point numbers by declaring and updating the global values of the variable and use it to produce the desired range of floating-point numbers by taking input from the user.# The required output is as:Please input the starting for your seriesPlease input the d for your seriesThe series produced by this method is0.25, 1.0, 1.75, 2.5, 3.25, 4.0, 4.75, 5.5, 6.25, 7.0,​

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
2

tex

huge

/bold

updating the global values of the variable and use it to produce the desired range of floating-point numbers by taking input from the user.# The required output is as:Please input the starting for your seriesPlease input the d for your seriesThe series produced by this method is0.25, 1.0, 1.75, 2.5, 3.25, 4.0, 4.75, 5.5, 6.25, 7.0,

Answered by AditiHegde
0

A simple python function to generate a series of floating-point numbers by declaring and updating the global values of the variable and use it to produce the desired range of floating-point numbers by taking input from the user is as follows:

strt = float(input("Please input the starting for your series"))

dif = float(input("Please input the d for your series:"))

rag = float(input("Enter the range for the series:"))

num = []

print("The series produced by this method is")

num.append(strt)

i = rag

num = strt

while i > 1:

   temp = temp + dif

   num.append(temp)

   i = i - 1

print (num)

Similar questions