Skip to content

Commit 8cc9747

Browse files
committed
yolo
1 parent 0e5e044 commit 8cc9747

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

__pycache__/import0.cpython-37.pyc

439 Bytes
Binary file not shown.

import0.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#from math import ceil
2+
3+
4+
5+
def myFn(x):
6+
return ceil(x)
7+
8+
def ceil(x):
9+
# only works for +
10+
print("this is my ceil")
11+
if x - int(x) == 0:
12+
return x
13+
elif x - int(x) >= 0.5:
14+
return int(x) + 1
15+
else:
16+
return int(x)
17+

import1.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#import math didn't work #Due to NamespaceCollxn NameError: name 'ceil' is not defined
2+
from import0 import myFn
3+
from math import ceil
4+
5+
print(myFn(5.3))
6+
print(ceil(5.3))

0 commit comments

Comments
 (0)