#calculator
import random
from datetime import datetime
import time
class Calculator:
def setup(self):
while True:
back = float(input("Give me an number!"))
if back == -143.123456789:
break#
else:
number = float(input("Type another nuber!!"))
if number == -143.123456789:
break
else:
operator = input("Give me an operator (+, -, *, /)")
if operator == "+":
print(back + number)
break
elif operator == "-":
print(back - number)
break
elif operator == "*":
print(back * number)
break
elif operator == "/":
print(back / number)
break
elif operator == "home":
break
else:
print("error")
break
#calculator
class news:
def setup(self):
while True:
print("D.News")
newscommand = input("Type news to show the news! Type home to close the app! ")
if newscommand == "home":
break
elif newscommand == "news":
print("The year 2026 started")
print("A new D.eSystem came out")
print("This year will be good")
break
#news
class Max:
def setup(self):
while True:
commandmax = input("Do everything for me!!(Type home to close max, type help to see all max commands)")
if commandmax == "hello":
answers = [
"hello",
"Hi,I am Max",
"Welcome",
"Hello friend",
"Hi,you are cool"
]
print(random.choice(answers))
elif commandmax == "why are you here":
answers = [
"Because I can",
"Why not",
"Because I want to help you",
"Becaus I want to be your friend",
"Because I am cool"
]
print(random.choice(answers))
elif commandmax == "what is the bigest planet in the solarsystem":
answers = [
"Jupiter",
"Its jupiter.",
"The bigest planet is jupiter.",
"It is jupiter."
]
print(random.choice(answers))
elif commandmax == "how old are you":
answers = [
"I was introduced with D.OS 8th gen (scratch) on 26 december 2024",
"I was introduced on 26 december 2024",
"We dont talk about age"
]
print(random.choice(answers))
elif commandmax == "what is that":
answers = [
"This is D.eSystem (prototyp)",
"It is D.eSystem",
"It is the new D.eSystem"
]
print(random.choice(answers))
elif commandmax == "what do you like":
answers = [
"I like D.electronics,D.OS,D.System,D.eSystem.",
"I like you!!",
"I like the world"
]
print(random.choice(answers))
elif commandmax == "hi":
answers = [
"hi",
"hello friend",
"Welcome",
"hello"
]
print(random.choice(answers))
elif commandmax == "how are you":
answers = [
"good",
"okay",
"Good,thanks for asking!!"
]
print(random.choice(answers))
elif commandmax == "what up":
answers = [
"nothing special",
"I am just enjoying the computer",
"I am chilling"
]
print(random.choice(answers))
elif commandmax == "home":
break
elif commandmax == "help":
print("You can type: what do you like, what is that, how old are you, what is the bigest planet in the solarsystem, why are you here, hello")
else:
print("unknown command!!Type help to show all Max commands,type home to close Max.")
#Max chatbot
class clock:
def setup(self):
while True:
commandclock = input("Type command for clock!!Type help to show all commands!!Type home to close clock!!")
if commandclock == "time":
now = datetime.now()
print(now.strftime("%H:%M:%S"))
elif commandclock == "timer":
timertime = float(input("How long?"))
print("If you close the app,the timer will stop.")
time.sleep(timertime)
elif commandclock == "home":
break
elif commandclock == "help":
print("You can type: time, timer, home")
else:
print("unknown command!!")
#clock
class calendar:
def setup(self):
while True:
commandcalendar = input("Type your command for calendar!!Type home to close calendar,if you close the app the reminder will stop!!Type help to show all commands!!")
if commandcalendar == "date":
now = datetime.now()
print(now.strftime("%d.%m.%Y"))
elif commandcalendar == "reminder":
remidname = input("Name your remind(Type home to close, you cant use your system while using the reminder!!)")
if remidname =="home":
break
else:
wait1 = float(input("How many days?(Type 999.9 to close this app, if you close the app the reminder will stop)"))
if wait1 == 999.9:
break
else:
wait2 = wait1 * 86400
time.sleep(wait2)
print(remidname)
#calendar
class desysversion:
def setup(self):
while True:
print("OS=D.eSystem 2(Py), UI=D.Touch UI micro, UX=string UX, brand=D.electronics")
break
#D.eSystem version
class notes:
def setup(self):
note = ""
while True:
action = input("Type create to create a new note!!Type show to show your note!!Type home to close this app!!You have to create a note befor you can show your note!!")
if action == "create":
note = input("Create a note!!")
elif action == "show":
if note == "":
print ("error!!You have no note")
else:
print(note)
elif action == "home":
break
else:
print("unknown command!!")
class manual:
def setup(self):
while True:
print("Type help to show all commands, type shutdown to close the system!!")
cmdh = input("Type home to close tips!!")
if cmdh == "home":
break
else:
print("unknown command")
#OS
class DeSyseng:
def __init__(self, name, complete, mode):
self.name = name
self.complete = complete
self.mode = mode
def setup(self):
print("welcome to", self.name)
if self.complete == 1:
while True:
# base mode
if self.mode == 1:
command = input("Type command (help): ")
if command == "help":
print("Commands: help, calculator, shutdown, news, max, clock, d.esys version, calendar, notes")
elif command == "shutdown":
print("System shutting down...")
break
elif command == "calculator":
print("Opening calculator...")
self.mode = 2
elif command == "news":
print("Opening D.News...")
self.mode = 3
elif command == "max":
print("Here is max")
self.mode = 4
elif command == "clock":
print("Here is clock")
self.mode = 5
elif command == "calendar":
print("here is calendar")
self.mode = 6
elif command == "d.esys version":
print("Here is D.eSystem version")
self.mode = 7
elif command == "notes":
print("here are your notes")
self.mode = 8
elif command == "tips":
print("here is tips")
self.mode = 9
else:
print("unknown command")
# open calculator
elif self.mode == 2:
Calculator().setup()
self.mode = 1 # home
elif self.mode == 3:
news().setup()
self.mode = 1 #home
elif self.mode == 4:
Max().setup()
self.mode = 1 #home
elif self.mode == 5:
clock().setup()
self.mode = 1 # home
elif self.mode == 6:
calendar().setup()
self.mode = 1 # home
elif self.mode == 7:
desysversion().setup()
self.mode = 1 #home
elif self.mode == 8:
notes().setup()
self.mode = 1 #home
elif self.mode == 9:
manual().setup()
self.mode = 1 #home
#D.eSys setup
class Person:
import random
def __init__(self, name):
self.name = name
def setup(self):
import time
import random
self.mode = 0
self.complete = 0
time.sleep(1)
print("Welcome in", self.name)
language = input("Welcome in D.eSystem setup,you can type later commands,press enter to continue!!: ")
if language == "english":
print("You selected English.")
elif language == "german":
print("Sie haben Deutsch ausgewählt.")
else:
print("Unknown language, defaulting to English.")
language = "english"
input("Press Enter to continue setup...")
self.mode = 1
self.complete = 1
self.language = language
#boot
p = Person("D.eSystem setup")
p.setup()
os = DeSyseng("D.eSystem", p.complete, p.mode)
os.setup()