Calculator code

Calculator code 



first = int(input('enter your first number :' ))
operater = input('enter operater number [ +,-,*,/,% [ :' )
        second = int(input('enter second number : '))
if operater =='+':
        print (first+second)
elif operater =='-':
        print (first-second)
elif operater =='*':
        print (first*second)
elif operater =='/':
        print (first/second)
elif operater =='%':
        print (first%second)
else :
        print ('invaled operation')





Upgrade Calculator code

name = input('enter your name ')                                  first = int(input('inter first number ..... '))
op = input('inter operater +..-..*../..%..//..**.. ')
second = int(input('inter second number ........... '))           if op == '+':                                                             print (first+second)
elif op == '-':                                                           print (first-second)                                      elif op == '*':
        print (first*second)
elif op == '/':
        print (first/second)
elif op == '%':
        print (first%second)
elif op == '//':
        print (first//second)
elif op == '**':
        print (first**second)
else :
        print ( name +'you wrong pleas rientur')



Comments

Popular posts from this blog

String editor

timedelta