[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/gitishman/Basic-Python-Programs/main/arithmetic_progression.py [Back]  [Original]

###########################################################################

# Question - Arithmetic Progression Generator

# # Develop a program that:
# 1- read the first term and the common difference of a arithmetic progression
# 2- show the first 10 terms of this progression
# 3- ask to user if he wants show some more terms
# 4- finish the program when user says he wants to show 0 terms

###########################################################################

print("Arithmetic Progression Generator")
print("-=" * 50)
first_term = int(input("First term: "))
common_difference = int(input("Common difference: "))
term = first_term
cont = 1
more = 10
total = 0
while more != 0:
    total += more
    while cont 

Web Proxy Viewer  |  New URL  |  Original Page