4 questions
It worked well at school, but it doesn't work when I get home.It says raw_input is undefined, what's wrong?import sysprint (sys.platform)print (2 ** 100)raw_input()Traceback (most recent call last): F...
class Tensor: def __init__(self, data, shape): self.data = data self.shape = shape self.tensor = shape_data(self.data,self.shape) # <-- * def shape_data(self,data,shape): temp1=[] temp2=[] sh...
def z(a,b): return a+bDeclare a function in z.py.result = z(3,4)print(result)This code is x.I saved it as py and ran it NameError: name 'z' is not defined why?It's in one space, but I don't know why ...
When I ran it on my computer, that error didn't work.But when I moved it to my laptop and ran it, it worked normally.What's wrong with the computer's running environment that doesn't work?
© 2024 OneMinuteCode. All rights reserved.