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