Aug-21-2019, 10:08 PM
Hi!
I think you could use something like this:
I hope this could help you,
newbieAuggie2019
I think you could use something like this:
print("\nBuongiorno.") totale = input("Per favore, inserisci l'importo totale da pagare.\n\n") decimali = float(totale) print("\nL'importo totale è di %.2f"% round(decimali,2), "€. Grazie per fare affari con noi.")And here I give you some inputs and outputs from running this little program:
Buongiorno. Per favore, inserisci l'importo totale da pagare. 24 L'importo totale è di 24.00 €. Grazie per fare affari con noi.
Buongiorno. Per favore, inserisci l'importo totale da pagare. 24.3 L'importo totale è di 24.30 €. Grazie per fare affari con noi.
Buongiorno. Per favore, inserisci l'importo totale da pagare. 24.35 L'importo totale è di 24.35 €. Grazie per fare affari con noi.
Buongiorno. Per favore, inserisci l'importo totale da pagare. 24.375 L'importo totale è di 24.38 €. Grazie per fare affari con noi.Please, keep in mind that as it is, this program gives you the total amount with a 'dot' (.) to separate the integer digits from the decimal digits, and not the Italian 'virgola' (,), which would require much more twisting to the code.
I hope this could help you,
newbieAuggie2019
newbieAuggie2019
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs