#!/usr/bin/env python3 import helloworld print(helloworld.hello()); print(helloworld.heyman(5, "StarNight")); print(helloworld.add(5, 6)); help(helloworld);
#!/usr/bin/env python import platform print("This is Python " + platform.python_version()); import helloworld a = 32 b = 10 print("%d + %d = %d" % (a, b, helloworld.add(a, b))); print("%d - %d = %d" % (a, b, helloworld.sub(a, b))); print("%d * %d = %d" % (a, b, helloworld.mul(a, b))); print("%f / %f = %f" % (a, b, helloworld.div(a, b)));
# 调用helloworld文件模块 import helloworld print('调用成功,输出') print(helloworld.add(100, 300))
#!/usr/bin/python import helloworld print helloworld.helloworld() helloworld.add(23)
def test_add(): assert (helloworld.add(1, 1) == 2)