Advertisement
Nairo05

Hausaufgabe I

Sep 26th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. # E
  2. print('Bitte eingeben:')
  3. volumenGetraenk = float(input('Volumen (in Liter): '))
  4. anteilAlkohol = float(input('Alkoholgehalt (in Prozent): '))
  5. massePerson = float(input('Körpermasse (in kg): '))
  6. geschlecht = input('Geschlecht (w/m): ')
  7. # V
  8. if geschlecht == 'w':
  9.     reduktionsfaktorJugendlicher = 0.6
  10. else:
  11.     reduktionsfaktorJugendlicher = 0.7
  12. masseAlkohol = 10*anteilAlkohol*volumenGetraenk*0.8
  13. ergebniss = masseAlkohol/(massePerson*reduktionsfaktorJugendlicher)
  14. # A
  15. print(' ')
  16. print(ergebniss, ' Promille')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement