This program is to get a list (a sequence) of numbers using a given equation, but once it's calculated, the intial two numbers aren't listed...
import math
def main():
print ("This program prints a sequence of integer numbers using given square root equation."
x, y = eval(input("Please enter the first two integers in sequence:"))
z = math.sqrt (x**2 + y**2)
n=int(input("Input the length of the sequence:"))
for i in range(n):
x, y = y, math.sqrt (x**2 + y**2)
print ((y))
main()

New Topic/Question
Reply



MultiQuote





|