Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def assegnazione(reddito, figli):
- reddito = int(reddito)
- if reddito >= 30000 and reddito < 40000 and figli >= 3:
- return(1000 * figli)
- elif reddito >= 20000 and reddito < 30000 and figli >= 2:
- return(1500 * figli)
- elif reddito < 20000:
- return(2000 * figli)
- else:
- return("non idoneo all' assegnazione del sussidio")
- https://pastebin.com/
- stop = False
- while not stop:
- reddito = int(input("reddito (inserisci 1 per terminare il codice): "))
- if reddito != 1:
- numFigli = int(input("numero dei figli"))
- print(f"il reddito da assegnare è {assegnazione(reddito, numFigli)}")
- print("-" * 56)
- else:
- print("codice terminato")
- stop = True
Advertisement
Add Comment
Please, Sign In to add comment