-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacrolinus.py
104 lines (69 loc) · 2.45 KB
/
macrolinus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import time
import psutil
print('MACROLINUS OS')
print('CREATED BY -> "THE BEST PYTHON PROGRAMMER"')
print('\n')
currentdate = time.strftime('%B - %D - %A - %Y')
print(currentdate)
def macrolinus():
while True:
print('1 app.calculator')
print('2 app.python3')
print('3 app.timer')
print('4 app.about os')
print('5 app.battery')
print('\n')
app = input('Enter app: ')
if app == 'calculator':
number1 = int(input('Enter first number: '))
number2 = int(input("Enter second number: "))
operator = input('Enter sign: ')
if operator == '/':
if number1 == 0 or number2 == 0:
print('zeros cannot be divided')
else:
print(int(number1 / number2))
print('\n')
if operator == '*':
print(number1 * number2)
print('\n')
if operator == '+':
print(number1 + number2)
print('\n')
if operator == '-':
print(number1 - number2)
print('\n')
if app == 'python3':
lines = int(input("Enter how much lines of code you want to write: "))
for line in range(lines):
try:
programme = input("type here: ")
exec(programme)
except:
print('some Error occured')
continue
print('\n')
if app == 'timer':
minutes = int(input('Enter minutes: '))
time.sleep(minutes * 60)
print('time is up')
print('\n')
if app == 'about os':
print('this is os called macrolinus created by "viraj sharma"')
print('with 4 apps')
print('this os is created using python language')
print('it ends app automatically')
print('when you see a litttle bit enter that means the app has ended')
print('and when os asks for username you need to enter your name')
print('this os does not need setup of username and password it has a 1 unique username and 2 unique password')
print('\n')
if app == 'battery':
print(int(psutil.sensors_battery().percent),'%')
print('\n')
username = input("username: ")
password = input('password: ')
if password == 'pumpulili' or password == 'putchi' and username == 'viraj':
print('\n')
macrolinus(username)
else:
print('wrong password or username')