Example #1
0
def math():
    input1 = float(input("Enter a whole number: "))
    opp = input("Enter the operation you would like to use: ")
    input2 = float(input("Enter another whole number: "))
    if opp == "*":
        calc2.multiply(input1, input2)
    elif opp == "+":
        calc2.add(input1, input2)
    elif opp == "-":
        calc2.sub(input1, input2)
    elif opp == "/":
        calc2.divide(input1, input2)
    else:
        print("Invalid entry")
Example #2
0
import calc2
print(calc2.add(2,3))
Example #3
0
def test_Add():
    value = calc2.add(NUMBER_1, NUMBER_2)
    assert value == 90
Example #4
0
# 以主程序形式运行

import calc2

print(calc2.add(100, 200))
Example #5
0
import sys
paths = sys.path
print(paths)
sys.path.append("c:\\Python_modules")

import calc2
c = calc2.add(4, 5)
print(c)
Example #6
0
# --*--coding:utf-8--*--

# author : hmchen
# email  : [email protected]
# date   : 2021/1/27 15:19
"""
自定义模块


"""
# 导本地工程包设置:包反键-->Mark Directory as -->Source Root
import calc2

print(calc2.add(1, 2))
import calc2

print(calc2.add(2, 4))
Example #8
0
def fun1():
    add()
    print("From Fun1")