commit message from python script
This commit is contained in:
@@ -1,8 +1,14 @@
|
|||||||
#! /usr/bin/env python3
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
import random
|
||||||
|
|
||||||
|
|
||||||
class my_rechner:
|
class my_rechner:
|
||||||
def __init__(self, zahl=0):
|
def __init__(self, zahl=0):
|
||||||
self.zahl = zahl
|
self.zahl = zahl
|
||||||
|
self.rechen_art = ['*', '+', '-']
|
||||||
|
self.art = random.choice(self.rechen_art)
|
||||||
|
|
||||||
|
|
||||||
def check_input(self):
|
def check_input(self):
|
||||||
pass
|
pass
|
||||||
@@ -11,14 +17,19 @@ class my_rechner:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def check_rechnen(self):
|
def check_rechnen(self):
|
||||||
self.zahl = 4
|
self.zahl = random.randint(1, 1000)
|
||||||
|
self.art = random.choice(self.rechen_art)
|
||||||
|
|
||||||
def main_run(self):
|
def main_run(self):
|
||||||
print(self.zahl)
|
|
||||||
my_rechner.check_rechnen(self)
|
|
||||||
print(self.zahl)
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
print(self.zahl , self.art)
|
||||||
|
r = str(str(self.zahl) + ' ' + str(self.art) + ' '+ str(self.zahl))
|
||||||
|
summe = eval(r)
|
||||||
|
self.check_rechnen()
|
||||||
|
print(r)
|
||||||
|
print(summe)
|
||||||
|
|
||||||
check_input = input("Noch eine Frage ? :")
|
check_input = input("Noch eine Frage ? :")
|
||||||
if len(check_input) == 1 and check_input == "n":
|
if len(check_input) == 1 and check_input == "n":
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user