11#!/usr/bin/python3
2- " Copyright© 2023 LinuxUsersLinuxMint"
3- " Python Calcutator Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır."
4- " Python Calcutator All Rights Reserved under the GPL(General Public License)."
5- " Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint"
6- " A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint"
2+ # Copyright© 2023 LinuxUsersLinuxMint
3+ # Python Calcutator Lite Tüm Hakları GPL(Genel Kamu Lisansı) altında korunmaktadır.
4+ # Python Calcutator Lite All Rights Reserved under the GPL(General Public License).
5+ # Bu Yazılımın Bir Kopyası GİTHUB da yayınlanmaktadır Görüntülemek için: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint
6+ # A Copy of This Software is published on GITHUB To view: https://github.com/LinuxUsersLinuxMint/LinuxUsersLinuxMint
77
8- command = input ('calc> ' )
9- about = "Python Calcutator CLI(Command Line Interface / Komut Satırı Arayüzü) LICENCE=GPL2"
8+ cmd = str (input ('calc> ' ))
109
11- if command == "calc" :
12- print ("calc> Transactions You Can Enter: " )
13- print ("collect\n Extraction\n \Impact\n Divide\n Percentage\n about" )
14- number1 = input ('{0} Enter The 1st number: ' . format (command ))
15- number2 = input ('{0} Enter The 2st number: ' . format (command ))
16- process = input ('{0} Enter the Transaction You Want to Perform: ' . format (command ))
17- addition = float (number1 )+ float (number2 )
18- subraction = float (number1 )- float (number2 )
19- multiplication = float (number1 )* float (number2 )
20- division = float (number1 )/ float (number2 )
21- Percentage = float (number1 )% float (number2 )
22- if process == "collect" :
23- print ("{0} + {1} = {2}" . format (number1 ,number2 ,addition ))
24- elif process == "Extraction" :
25- print ("{0} - {1} = {2}" . format (number1 ,number2 ,subraction ))
26- elif process == "Impact" :
27- print ("{0} * {1} = {2}" . format (number1 ,number2 ,multiplication ))
28- elif process == "Divide" :
29- print ("{0} / {1} = {2}" . format (number1 ,number2 ,division ))
30- elif process == "Percentage" :
31- print ("{0} % {1} = {2}" . format (number1 ,number2 ,Percentage ))
32- else :
33- print ("Invalid Proccess!" )
34- if command == "about" :
35- print (about )
36- elif command == "exit" :
37- exit ()
38- elif command == "help" :
39- print ("Python calc Help" )
40- print ("\n Command: calc , about , help , exit , git-address , web-site , ver , licence" )
41- elif command == "git-address" :
42- print ("Github Link: https://github.com/LinuxUsersLinuxMint" )
43- elif command == "web-site" :
44- print ("linuxuserslinuxmint.github.io" )
45- elif command == "ver" :
46- print ("Version: 0.2 (Last Updated September 17 , 2023 , 14:43)" )
47- elif command == "licence" :
48- print ("This Software is protected under the GPL2 license" )
49- else :
50- print ("Invalid Command!" )
10+ if cmd == "calc" :
11+ print ("calc> Transactions you can enter: " )
12+ print ("Addition\n Subraction\n \Multiplication\n Division\n Percentage\n 1,2,3,4" )
13+ n1 = float (input ('{0} Enter The 1st Number: ' . format (cmd )))
14+ n2 = float (input ('{0} Enter The 2st Number: ' . format (cmd )))
15+ process = input ('{0} Enter the Transaction You Want to Perform: ' . format (cmd ))
16+ if process == "1" :
17+ print ("{0} + {1} = {2}" . format (n1 ,n2 ,n1 + n2 ))
18+ elif process == "2" :
19+ print ("{0} - {1} = {2}" . format (n1 ,n2 ,n1 - n2 ))
20+ elif process == "3" :
21+ print ("{0} * {1} = {2}" . format (n1 ,n2 ,n1 * n2 ))
22+ elif process == "4" :
23+ print ("{0} / {1} = {2}" . format (n1 ,n2 ,n1 / n2 ))
24+ elif process == "5" :
25+ print ("{0} % {1} = {2}" . format (n1 ,n2 ,n1 % n2 ))
26+ else :
27+ print ("Invalid Process!" )
0 commit comments