Ejemplo n.º 1
0
#!/usr/bin/env python3

import helloworld

print(helloworld.hello());
print(helloworld.heyman(5, "StarNight"));
print(helloworld.add(5, 6));
help(helloworld);
Ejemplo n.º 2
0
#!/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)));
Ejemplo n.º 3
0
# 调用helloworld文件模块
import helloworld
print('调用成功,输出')
print(helloworld.add(100, 300))
Ejemplo n.º 4
0
#!/usr/bin/python
import helloworld

print helloworld.helloworld()
helloworld.add(23)
Ejemplo n.º 5
0
def test_add():
    assert (helloworld.add(1, 1) == 2)