Computer Science, asked by shivanisreenaidu, 10 months ago

Write a python program to find the Nth term of the series : 1,4,9,25,36,49,64,81.........
Sample input:
18
Sample output:
324

Answers

Answered by Tejas1582
7

Answer:

a = int(input("Enter Value"))

print( a*a )

Explanation:

Answered by anindyaadhikari13
1

Solution:

The given code is written in Python.

n = int(input('Enter the value of n: '))

print(f'The {n}th term of the series is: {n * n}')

Explanation:

  • We observe the pattern of the series. We see that the nth term of the series is its square.
  • For example, second term is 4 which is the square of 2, third term is 9 which is the square of 3 and so on...
  • So we ask the user to enter the value of n.
  • After taking input, we display the value of n²
  • In this way, the problem is solved.

Output is attached.

Attachments:
Similar questions