![]() |
|
[Help] Question about programming in python for class - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Help] Question about programming in python for class (/showthread.php?tid=5588343) |
Question about programming in python for class - KanyeMidEast - Mar 30, 2017 Hey I just started taking a programming class since I wanted to learn but never tried to learn by myself, anyways i'm a little confused since my professor wants us to learn on our own before showing us how to do it. This is what we are supposed to do https://gyazo.com/c7d1b357bbe78ac7827fc763d649848b and this is what mine looks like https://gyazo.com/b78c68fa27b73b9a0e376a633bf17443 (theres a name I just blanked it out) Sorry for the simple question. * - Annabelle Lee - Mar 30, 2017 Put the code you put into the interpreter into a python file. (ending .py) instead. Then execute that file. From that window, click File->New file. Put the code in popped up window. Then do Run -> Run Module for it to run. * - ende124 - Mar 30, 2017 Instead of writing the code in the shell, try making a file that you can run. What you're doing now is writing a line of code in the shell and immediately executing it. What you want is a file. To do this click File, then New File. Here you can write how much code you want before running it. * - KanyeMidEast - Apr 1, 2017 (Mar 30, 2017 10:59 PM)ende124 Wrote: Instead of writing the code in the shell, try making a file that you can run. What you're doing now is writing a line of code in the shell and immediately executing it. What you want is a file. This solved it thanks! I'm still learning but it is actually kinda of fun learning something new! |