Questions tagged [defined]

A definition is an unambiguous statement for the meaning of a word or phrase. In programming, a variable definition provides all the details for that variable.

304 questions
-3
votes
1 answer

Python "not defined" in lottery

Im learning for a book "Intr. Python 2.6.6" and I have the this error in a example line 12, in aux=num_ele NameError: name "num_ele" is not defined But I do not understand what the problem # -*- coding:utf-8 *-* import random import…
riojano0
  • 83
  • 1
  • 6
-4
votes
2 answers

Variable says it's not defined, but it is

error info: Traceback (most recent call last): File "C:/Users/ADMIN/Desktop/python/footballcomplex.py", line 85, in if input2 == 'a': NameError: name 'input2' is not defined this is line 83-85: input2 = input("Would you like to long…
cat
  • 1
-5
votes
2 answers

Python 'height' is not defined

Python is saying that the name 'height' is not defined, and I have no idea why that is, as according to my logic, I return the variable height, so I would be able to access it within my for loop? Can someone point me in the right direction? Thanks.…
Jake
  • 53
  • 1
  • 3
  • 8
-5
votes
2 answers

Why does this Python 3.3 code not work? digc not defined

It prints diga and digb but doesnt work with c! Any help? It's supposed to be a Denary to Binary converter but only 1-64, once i've cracked the code will increase this! Thanks so much denaryno=int(input("Write a number from 1-64 ")) if…
thankful_1
  • 49
  • 6
1 2 3
20
21