
Size: a a a
def calculator():
os.system('cls')
while True:
def manual():
print('Input example: 11 + 96\nThis calculator have standard methods and special:\n"//" - multiple '
'division\n"**" - exponentiation')
input('>>Press Enter<<')
os.system('cls')
calculator()
try:
inp = input ('-: ').split()
if inp[0] == 'manual':
os.system('cls')
manual()
elif inp[0] == 'exit':
main()
print (int(inp[0]) + int(inp[2]) if inp[1] == '+' else int(inp[0]) - int(inp[2]) if inp[1] == '-' else int(inp[0]) / int(inp[2]) if inp[1] == '/' else int(inp[0]) // int(inp[2]) if inp[1] == '//' else int(inp[0]) *
int(inp[2]) if inp[1] == '*' else int(inp[0]) ** int(inp[2]) if inp[1] == '**' else 'Wrong input!')
except:
print ('Wrong input!')
...
elif command_line[0] == 'exit' or command_line[0] == 'off' or command_line[0] == 'shutdown':
os.system('cls')
print('Bye!')
log.write(f'User "{login_new}" has logged out\n')
time.sleep(2)
sys.exit()
def calculator():
os.system('cls')
while True:
def manual():
print('Input example: 11 + 96\nThis calculator have standard methods and special:\n"//" - multiple '
'division\n"**" - exponentiation')
input('>>Press Enter<<')
os.system('cls')
calculator()
try:
inp = input ('-: ').split()
if inp[0] == 'manual':
os.system('cls')
manual()
elif inp[0] == 'exit':
main()
print (int(inp[0]) + int(inp[2]) if inp[1] == '+' else int(inp[0]) - int(inp[2]) if inp[1] == '-' else int(inp[0]) / int(inp[2]) if inp[1] == '/' else int(inp[0]) // int(inp[2]) if inp[1] == '//' else int(inp[0]) *
int(inp[2]) if inp[1] == '*' else int(inp[0]) ** int(inp[2]) if inp[1] == '**' else 'Wrong input!')
except:
print ('Wrong input!')
...
elif command_line[0] == 'exit' or command_line[0] == 'off' or command_line[0] == 'shutdown':
os.system('cls')
print('Bye!')
log.write(f'User "{login_new}" has logged out\n')
time.sleep(2)
sys.exit()