Python Forum
Variable not defined, but it is defined... i think
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable not defined, but it is defined... i think
#1
Hello,

im totally new to programming and i ran into a problem i can not solve...

i wanted to start my own program, so i would actually learn something and get familiar with functions, variables etc.

everytime i open a new project, i can not run the code in my terminal... i made an example as basic as possible (i tried to run the example)

-----------------------------------

   

thx for help
Reply
#2
A string must be enclosed in quotes (single ' or double ").
>>> person = 'Obama'
>>> person
'Obama'
>>> person = "Obama"
>>> person
'Obama'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Regarding Defined Functions Hudjefa 1 1,351 Nov-05-2024, 04:59 AM
Last Post: Gribouillis
  NameError: name 'pi' is not defined katebishop 2 4,225 Jul-15-2024, 05:48 AM
Last Post: Pedroski55
Question Variable not defined even though it is CoderMerv 3 5,429 Mar-28-2024, 02:13 PM
Last Post: Larz60+
  I'm getting a NameError: ...not defined. vonArre 2 13,366 Mar-24-2024, 10:25 PM
Last Post: vonArre
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 2,764 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 11,962 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  'answers 2' is not defined on line 27 0814uu 4 3,116 Sep-02-2023, 11:02 PM
Last Post: 0814uu
  tk is not defined jip31 8 20,703 Aug-03-2023, 05:01 PM
Last Post: tralfazy
  Simple Question - ' defined as "a". ?' Ryan012 10 5,028 May-27-2023, 06:03 PM
Last Post: Ryan012
  Badly defined python code? Ken76 2 2,084 May-25-2023, 11:05 PM
Last Post: DigiGod

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020