예제 #1
0
import module2

c = module2.add(3,4)
print(c)

d = module2.sub(3,4)
print(d)

e = module2.mul(3,4)
print(e)

f = module2.div(10,5)
print(f)
예제 #2
0
import module2

ins = int(
    input(
        '''Enter Your Choice :\n\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division\n5.Modulus\n6.Square Root\n\nChoice : '''
    ))

if (ins == 1):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.add(a, b))
if (ins == 2):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.subt(a, b))
if (ins == 3):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.mult(a, b))
if (ins == 4):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.div(a, b))
if (ins == 5):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.mod(a, b))
if (ins == 6):
    a = float(input("Enter 1st number : "))
    b = float(input("Enter 2nd number : "))
    print(module2.sqrt(a, b))
예제 #3
0
import moduleTest as mod
from module2 import add, mul, div
print("this is our basemodule ")
mod.hello()
mod.hii()
mod.go()
adres = add(12, 12)
dres = div(12, 3)
mres = mul(12, 3)
print("this  addres = \t %d" % adres)
print(" this is  divide  =\t %d" % dres)
print(" this multiplication  = \t  %d" % mres)
if __name__ == '__main__':
    print(" this my executable code ")
예제 #4
0
from module1 import *
print(a)
print(b)
print(add(4, 5))
print(sub(4, 5))
print(mul(4, 5))

import sys
print(sys.path)
sys.path.append('C:/Users/Vali Basha/Desktop/11morning')
print(sys.path)

from module1 import (add, sub)
print(add(4, 5))
print(sub(4, 5))

from module2 import *
from module3 import *
from module2 import *
print(name)
print(city)
print(add(3, 4))
print(div(12, 3))

import module3
import module2
print(module3.name)
print(module2.add(3, 4))
print(module2.div(12, 3))
print(module3.div(12, 3))
print(name)