Business calculator
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
|
||||||
|
buisnes_calculator.py
|
||||||
|
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
with open('gold.txt') as a:
|
||||||
|
gold = a.read()
|
||||||
|
|
||||||
|
|
||||||
|
with open('silver.txt') as b:
|
||||||
|
silver = b.read()
|
||||||
|
|
||||||
|
|
||||||
|
with open('iron.txt') as c:
|
||||||
|
iron = c.read()
|
||||||
|
|
||||||
|
|
||||||
|
with open('diamond.txt') as d:
|
||||||
|
diamond = d.read()
|
||||||
|
|
||||||
|
kg = input ("kilogram>")
|
||||||
|
|
||||||
|
print ('1 -- iron' )
|
||||||
|
|
||||||
|
print ('2 -- silver' )
|
||||||
|
|
||||||
|
print ('3 -- gold' )
|
||||||
|
|
||||||
|
print ('4 -- diamond' )
|
||||||
|
|
||||||
|
item = int(input (">"))
|
||||||
|
|
||||||
|
if item == 1: print (int(iron) * int(kg))
|
||||||
|
|
||||||
|
elif item == 2: print (int(silver) * int(kg))
|
||||||
|
|
||||||
|
elif item == 3: print (int(gold) * int(kg))
|
||||||
|
|
||||||
|
elif item == 4: print (int(diamond) * int(kg))
|
||||||
|
|
||||||
|
else: print ("gabim!")
|
||||||
|
|
||||||
|
print ("vazhdo? 1=po 2=jo")
|
||||||
|
|
||||||
|
cc = int(input ("vazhdo?>"))
|
||||||
|
|
||||||
|
if cc == 1:
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
subprocess.Popen(['app.bat'])
|
||||||
|
|
||||||
|
else: print ("ok")
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
subprocess.Popen(['app.bat'])
|
||||||
Reference in New Issue
Block a user