Variables - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Variables (/thread-8151.html) |
Variables - Demini - Feb-07-2018 Trying to understand why I don't get the result the books says. (Python Crash Course) message = "Hello Python world!" print(message) message = "Hello Python Crash Course World!" print(message) In the book the result says Hello Python world! Hello Python Crash Course World! What I am getting is message = "Hello Python world!" print(message) message = "Hello Python Crash Course World!" print(message) I am using Microsoft Word pad. I was using Geany 8 months ago and my result was correct. Do I need a program to run variables? RE: Variables - nilamo - Feb-07-2018 Code is just text, saved in a plain text file, without formatting. Because of that, Word pad is not a good editor to use: it might add formatting where there shouldn't be any. Notepad++ or Visual Studio Code (or Geany, or any of hundreds of other editors) are fine. Geany is what's known as an Integrated Development Environment (or IDE). It's called Integrated, because it's a bunch of different, unrelated, tools combined into one coherent whole. Which is how it was able to run your code and show you the output. Word pad is just an editor. All it does is edit text. Expecting it to do anything other than edit text is madness :p Python is the program which you should use to run your code and get output. https://docs.python.org/3/using/cmdline.html#command-line RE: Variables - Demini - Feb-08-2018 Is there another way to use python? My screen shows python 3.6. Starting; Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> I do not have another way of running variables other than what is posted. I open the program and above is what I see. I also do not know how to use the program. I am a beginner. RE: Variables - buran - Feb-08-2018 https://python-forum.io/Thread-Basic-How-to-Execute-python-code RE: Variables - Demini - Feb-09-2018 The link is useful. I don't understand how to make a variable from reading the crash course. Do I type a specific in IDE or IDLE RE: Variables - tyrael69 - Feb-09-2018 (Feb-09-2018, 01:53 AM)Demini Wrote: The link is useful. I don't understand how to make a variable from reading the crash course. Do I type a specific in IDE or IDLE You don't need a specific program or IDE to make a variable, a variable is what you define it to be. Here is a short video on variables in Python, I think it will help you https://www.youtube.com/watch?v=BAoV5_qVKco |