-3
x = 10

print(x)

the message i get:

PS H:\VS Code\100 Days of Code\Day16 - OOP> conda activate base
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.       

At line:1 char:1

+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

 
Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32


Warning:

not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation


 
  File "<stdin>", line 1, in <module>
NameError: name 'X' is not defined


>>> print(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
>>>
SuperStormer
  • 4,997
  • 5
  • 25
  • 35
  • 1
    Good for you! trying to learn a bit of coding... It seems you DO have python installed, but I'm not sure if it has something to do with you calling it from a virtual environment. Please do a little research on the link provided in the warning and update your question, posting how you tried to fix it. – RichieV Feb 23 '21 at 14:09

1 Answers1

1

This is a generic error, showing that conda is not installed, or at the very least that it is not accessible by the command-line where you are attempting to run this. Its unrelated to Python.

I'm not sure why you are using conda for this task, but I assume it is related to this 100 Days of Code thing?

Does the program give you some instructions on how to set up your environment? Maybe try going over that again.

You may also find some benefit in using a dedicated python editor, which would allow you to work on your python files without running through Powershell.

If you are positive that Powershell + Conda is correct, you will need to install Conda, and expose it to the powershell path.

SirLich
  • 79
  • 1
  • 12
  • i got it to work now, it seems that i try runnning the codde by using shift+enter which cause it to not working, but after i run it in terminal with the run button it seems to work now – Yossaphat Kulvatunyou Feb 23 '21 at 14:15