[ Web Proxy ]
URL:
Viewing: https://mofanpy.com/tutorials/python-basic/basic/personal-module [Back]  [Original]

| Python []

x AI


: Huanyu Mao : : 2016-01-01

,balance.py

d=float(input('Please enter what is your initial balance: \n')) p=float(input('Please input what is the interest rate (as a number): \n')) d=float(d+d*(p/100)) year=1 while year<=5: d=float(d+d*p/100) print('Your new balance after year:',year,'is',d) year=year+1 print('your final year is',d)

import balance

import balance """" Please enter what is your initial balance: 50000 # Please input what is the interest rate (as a number): 2.3 # Your new balance after year: 1 is 52326.45 Your new balance after year: 2 is 53529.95834999999 Your new balance after year: 3 is 54761.14739204999 Your new balance after year: 4 is 56020.653782067144 Your new balance after year: 5 is 57309.12881905469 your final year is 57309.12881905469 """"

Macpythonsite-packages


:

""

wechat [wechat]
    []

    Python

    :



    Email: mofanpy@hotmail.com

    © 2022 mofanpy.com All Rights Reserved ICP20060366


    Web Proxy Viewer  |  New URL  |  Original Page