modified: 2.Erste Programme/4. Fahrkartenautomat Python/main.py

new file:   "3. \303\234bungen/10.03.2022/Ausgabewerte.py"
	new file:   "3. \303\234bungen/10.03.2022/Programmfehler.py"
	new file:   "3. \303\234bungen/10.03.2022/Zylinder.py"
This commit is contained in:
2022-03-10 14:42:22 +01:00
parent ce3895240c
commit f79c423b8e
4 changed files with 55 additions and 25 deletions

View File

@@ -0,0 +1,16 @@
# Das Programm berechnet den Oberflächinhalt und Volumen eines Zylinders
from cmath import pi
durchmesser = int(input('Durchmesser:'))
höhe = int(input('Höhe:'))
# hier felt die Verabreitung
radius=durchmesser/2
# Oberflächeninhalt
oberflächeninhalt=2*pi*radius*(radius+höhe)
#Volumen
volumen=pi*(radius**2)*höhe
# Ausgabe
print('Oberflächeninhalt',oberflächeninhalt,'\r\n','Volumen:', volumen)