You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Find e to the Nth Digit - Just like the previous problem, but with e instead of Pi. Enter a number and have the program generate e up to that many decimal places. Keep a limit to how far the program will go.
importdecimalasd
defe(num, dp):
rounded=round(num, dp)
returnrounded
x=d.Decimal(input("Number: "))
dp=int(input("How many DP: "))
print(f"Your number to {dp} decimal places = {e(x, dp)}")