Python Forum
Just starting out, allready stuck.. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Just starting out, allready stuck.. (/thread-7353.html)

Pages: 1 2


RE: Just starting out, allready stuck.. - squenson - Jan-06-2018

The "prompt" is the invite sign that is shown at the beginning of each line. If you open a terminal window (menu start, run cmd), you see a prompt like C:\User\myname. If the prompt you see is something like >>>, it means that you are already inside the python program. Type print("hello") and then you should see Hello on the next line, then the prompt again.


RE: Just starting out, allready stuck.. - Sandman - Jan-06-2018

(Jan-06-2018, 07:36 PM)Gribouillis Wrote: It won't work in the python shell. The cd command works in a terminal/console. But Geany has probably a keyboard shortcut to run the program.
i've been trying it in a terminal, no succes...

yeah i know it does, but the exercise is to run the program from a terminal :)

But it's OK, guys... i'll just skip this one. Maybe i'll learn how to fix it when i progress through the book


RE: Just starting out, allready stuck.. - wavic - Jan-06-2018

Windows? If you hit CTRL+R and type cmd then hit Return it will open a terminal window. This is called terminal.
If you type python into that terminal and hit Return the Python interactive interpreter will be opened. You will recognize it by >>> prompt.

So, writing a script and save it in a .py file? In order to run it, you have to do it in the cmd. The first one.

Actually Win+R

Pff


RE: Just starting out, allready stuck.. - snippsat - Jan-07-2018

Look at this Python 3.6 and pip installation under Windows, part-2
It's important to install correct so python and pip is in environment variable Path of Windows.
Here a run with cmd from start,i have this hello.py in folder C:\foo
print('hello world')
Start cmd nothing is hided all from start.
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. Med enerett.

C:\Windows\System32>cd\

C:\>cd foo

C:\foo>python hello.py
hello world

C:\foo>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 2 + 4
6
>>> print('Now in interactive interpreter')
Now in interactive interpreter
>>> exit()

C:\foo>pip -V
pip 9.0.1 from c:\python36\lib\site-packages (python 3.6)

C:\foo>
This most work,if not follow install in link first.


RE: Just starting out, allready stuck.. - sparkz_alot - Jan-07-2018

(Jan-06-2018, 11:43 PM)wavic Wrote: If you hit CTRL+R

I believe that should be "Windows button + R"

I would also suggest deleting your current file, and rewrite and save it using Notepad. Geany is a good IDE, but there are settings and things to remember when using it. While things are still simple, it's ok to use a plain text editor. This will give you time to learn how to properly setup and use Geany.


RE: Just starting out, allready stuck.. - wavic - Jan-07-2018

(Jan-07-2018, 12:34 AM)sparkz_alot Wrote:
(Jan-06-2018, 11:43 PM)wavic Wrote: If you hit CTRL+R

I believe that should be "Windows button + R"

I would also suggest deleting your current file, and rewrite and save it using Notepad. Geany is a good IDE, but there are settings and things to remember when using it. While things are still simple, it's ok to use a plain text editor. This will give you time to learn how to properly setup and use Geany.
Right! My mistake Cool


RE: Just starting out, allready stuck.. - Sandman - Jan-07-2018

(Jan-06-2018, 11:43 PM)wavic Wrote: Windows? If you hit CTRL+R and type cmd then hit Return it will open a terminal window. This is called terminal.
If you type python into that terminal and hit Return the Python interactive interpreter will be opened. You will recognize it by >>> prompt.

for some reason, using this method to open a terminal, it worked :D thanks.