daily pastebin goal
23%
SHARE
TWEET

Codice Python

a guest Feb 14th, 2018 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. contaYen100=0
  2. sommaEUR=0
  3. sommaYEN=0
  4. conversione_euro_yen=0.25
  5. moneta_euro=-1
  6. numMonete=int(input("Inserisci il numero di monete: "))
  7. for i in range(numMonete):
  8.     while moneta_euro < 0:
  9.         moneta_euro=float(input("Inserisci la moneta in euro: "))
  10.     moneta_yen=moneta_euro*conversione_euro_yen
  11.     contaYen100+= (moneta_yen>=100)
  12.     sommaEUR=sommaEUR+moneta_euro
  13.     sommaYEN=sommaYEN+moneta_euro*0.25
  14.     moneta_euro = -1
  15. print("Gli yen superiori o uguali a 100 sono ",contaYen100,", il totale degli euro inseriti e' ", sommaEUR,
  16.       ", il totale degli yen inseriti e' ", sommaYEN)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top