nameerror tag

4 questions


1 answers
93 views
0
NameError: name 'raw_input' is not defined

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...

1 years ago

1 answers
83 views
0
What runs on Jupiter's laptop is not working on Python. (NameError: name 'XXX' is not defined)

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...


1 answers
60 views
0
Python def. I have a question

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 ...

1 years ago

1 answers
120 views
0
I entered the correct code, but an error appears and does not run. NameError: name 'speed' is not defined.

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?

2 years ago

© 2024 OneMinuteCode. All rights reserved.