Professional Documents
Culture Documents
InvBankSys - de Vera Lehd Kenneth Dwaine Gutierrez
InvBankSys - de Vera Lehd Kenneth Dwaine Gutierrez
You can use the online simulator https://edube.org/sandbox to complete this Mini Project.
Copy and paste your work into this MS word file InvBankSys_<<YourName>>.docx
(e.g. InvBankSys_ChanTaiMan.docx) and upload to Moodle.
Retrieve the user’s desired currency to be converted to HKD into variable (Curr)
Retrieve the amount to be converted into variable (am)
Initialize the variable(Euro_rate) as 8.02.
Initialize the variable(USD_rate) as
"""
EURO_RATE = 8.02
USD_RATE = 7.75
while True:
print("4. Quit")
command = input()
if command == "1":
if Curr=="Euro":
HKD=am*EURO_RATE
print(am,"Euro = ",HKD,"HKD")
elif Curr=="USD":
am= float(input("Amount to be converted: "))
HKD=am*USD_RATE
print(am,"USD = ",HKD,"HKD")
am=float(input('Input an amount:'))
print('The minimum numbers of coins for ', am, 'dollars are: ')
cal= am //10
re10= am%10
cal5=re10//5
re5=re10%5
cal2=re5//2
re2=re5%2
cal1=re2//1
print('10-dollar coin(s):',cal)
print('5-dollar coin(s):',cal5)
print('2-dollar coin(s):',cal2)
print("1-dollar coin(s):",cal1)
p=float(input('Input principle:'))
rate=float(input('Input rate:'))
i=1
while i<=y:
p=p*(1+rate)
i += 1
break