Share your repls and programming experiences

← Back to all posts
Exponential Function Calculator
YashKanda (1)

Exponential Function Calculator: when you put in value it will show results of x value to the -100 to 100th power. Created by Yash K.

malvoliothegood (851)

Here is something more concise and flexible:

base = float(input("What is the base of the exponential function: "))
lower_power_limit = int(input("What is the lowest power you want to use: "))
upper_power_limit = int(input("What is the highest power you want to use: "))

step = 1

for power in range(lower_power_limit, upper_power_limit + 1, step):
  print(base, "to the power of", power, "is", pow(base, power))