We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e5e044 commit 8cc9747Copy full SHA for 8cc9747
3 files changed
__pycache__/import0.cpython-37.pyc
439 Bytes
import0.py
@@ -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
@@ -0,0 +1,6 @@
+#import math didn't work #Due to NamespaceCollxn NameError: name 'ceil' is not defined
+from import0 import myFn
+from math import ceil
+print(myFn(5.3))
+print(ceil(5.3))
0 commit comments