Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 115b1aa

Browse files
committed
Init ⬆️
1 parent 18fcb78 commit 115b1aa

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

‎Binär Umwandlung.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def binaer():
2+
try:
3+
x = input("gib Binär ein: ")
4+
print(int(x,2))
5+
binaer()
6+
except:
7+
print("geht nicht")
8+
binaer()
9+
10+
binaer()

‎Hex Umwandlung.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def heximal():
2+
try:
3+
x = input("gib Hex ein: ")
4+
print(int(x,16))
5+
heximal()
6+
except:
7+
print("geht nicht")
8+
heximal()
9+
10+
heximal()

‎Klassenbeispiel.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#Dies soll ein Beispiel für eine Klasse sein in Python
2+
3+
class make():
4+
def __init__ (self,color,length,height):
5+
color = self.color
6+
length = self.length
7+
height = self.height
8+
def car(color,length,height):
9+
print ("""The color is %s,the length is %s,The length is %s""" % (color,length,height))
10+
11+
# make.car("red","2.5","3") Beispielausführung des Programms
12+
13+
class do(make):
14+
pass
15+
16+
# Beispiel von Klassenverebung in Python
17+
# do.car("red","2.5","3") Die Methode von der Klasse make wird vererbt
18+
19+
# Alpay Yildirim 06.08.2014 Python 3.4.1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /