here's my code
#Program for calculating the nTH Term sequence=range(0,40,3) a=int(input("The first term is:")) d=int(input("The common difference is:")) n=len(sequence) print("The number of terms is:",n) print("The last term of sequence is: ") Tn=a+((n-1)*d) print(Tn)
how can i make this code to run again using if condition and with new values which i will input again ORrr i just have to put an if condition and copy/paste my code inside it?
Karl answered question
Have an answer?