Sep-07-2018, 06:56 AM
Hi^^
I am beginning to learn some coding with python and hence I am a total beginner.
I have not found in this community any beginner-section, so I really hope that this is the correct place to post
a noob question - I try my best to explain the issue as well as I can.
On Topic:
I am using Python-Version 3.7 (64-bit) on a Win10 OS.
Within the IDLE, I have opened a new file and typed it in this code (an exercise from a beginner book) :
regards,
Placebo
I am beginning to learn some coding with python and hence I am a total beginner.
I have not found in this community any beginner-section, so I really hope that this is the correct place to post
a noob question - I try my best to explain the issue as well as I can.
On Topic:
I am using Python-Version 3.7 (64-bit) on a Win10 OS.
Within the IDLE, I have opened a new file and typed it in this code (an exercise from a beginner book) :
if name == 'Alice': print('Hi Alice.') elif age < 12: print('You are not Alice, kiddo.') elif age > 2000: print('Unlike you, Alice is not an undead, immortal vampire.') elif age > 100: print('You are not Alice, grannie.')This was the output within the IDLE:
Output:Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
= RESTART: C:/Users/kr-ga/AppData/Local/Programs/Python/Python37/vampire.py =
Traceback (most recent call last):
File "C:/Users/kr-ga/AppData/Local/Programs/Python/Python37/vampire.py", line 1, in <module>
if name == 'Alice':
NameError: name 'name' is not defined
>>>
The isolated error-message was that one:Error:Traceback (most recent call last):
File "C:/Users/kr-ga/AppData/Local/Programs/Python/Python37/vampire.py", line 1, in <module>
if name == 'Alice':
NameError: name 'name' is not defined
>>>
Im grateful for any help how to fix that.regards,
Placebo