Beispiel #1
0
 def test_func(self):
     self.assertEqual(1, example.my_mod(7, 3))
     self.assertEqual(120, example.fact(5))
import example

print("5! = " + str(example.fact(5)))
print("5 % 2 = " + str(example.my_mod(4, 2)))
print("The current time is " + str(example.get_time()))
Beispiel #3
0
import example

print(example.fact(5))
print(example.my_mod(9, 4))
print(example.get_time())
Beispiel #4
0
import example

print("factorial(5) = {}".format(example.fact(5)))
print("7 modulo 3 = {}".format(example.my_mod(7, 3)))
print("Current time = {}".format(example.get_time()))
Beispiel #5
0
import example

example.set_requirments(7)
print('My_varaiable: %s' % example.cvar.My_variable)
print('fact(5): %s' % example.fact(5))
print('my_mod(7,3): %s' % example.my_mod(7, 3))
print('get_time(): %s' % example.get_time())
#!/usr/bin/env python
#-*- coding:utf-8 -*-

import example

print(example.fact(5))
print(example.my_mod(7, 3))
print(example.get_time())
Beispiel #7
0
import example
print example.fact(5)
print example.my_mod(7, 3)
print example.get_time()
Beispiel #8
0
# some_file.py
import sys
sys.path.insert(0, './example/')

import example

print "MOD: %d" %example.my_mod(4, 3)
print "Factorial(5): %d" %example.fact(5)
print "Global Variable: %d" %example.cvar.My_variable
#!/usr/bin/python
# -*- coding: utf-8 -*-

import example

print("fact 5 : %s" % example.fact(5))
print("my_mod 7 3 : %s" % example.my_mod(7, 3))
print("get_time : %s" % example.get_time())
Beispiel #10
0
def test_my_mod():
    assert 1 == example.my_mod(7, 3)
Beispiel #11
0
import example
print example.fact(5)
print example.my_mod(7,3)
print example.get_time()
Beispiel #12
0
#!/usr/bin/env python3

import example

print(example.fact(5))
print(example.my_mod(17, 6))
print(example.get_time())
Beispiel #13
0
import example

print example.fact(4)
print example.my_mod(23, 7)
print example.cvar.My_variable + 4.5
import example
print(example.fact(5))
print(example.my_mod(7, 3))
print(example.get_time())

Beispiel #15
0
import example
print example.fact(4)
print example.my_mod(23,7)
print example.cvar.My_variable + 4.5

l = [10, 2]
print example.my_array(l)
Beispiel #16
0
#test.py
import example

a = example.fact(5)
print(a)
b = example.my_mod(7, 4)
print(b)
c = example.get_time()
print(c)
Beispiel #17
0
import example
example.fact(5)
example.my_mod(7, 3)
example.get_time()