Python Forum
Incredibly basic coding problem
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incredibly basic coding problem
#11
I'm using a Mac, not windows. I figured out how to upload a screenshot. As you can see, the console only shows the first line of the code (assuming that the "console" is what I think it is):

http://prnt.sc/e7d7p0
Reply
#12
Judging from your screen shot you are running multiple instances of your script and not stopping any of them (the red box on the left says the scripts is running, clicking on the red box stops the process). 

This line:
Quote:/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/andreasfinsen/PycharmProjects/untitled1/second.py

is normal and just indicates what file is being run. 

Putting the '100' and '10' in the input statement has no effect, it merely becomes part of the input string, it is still waiting for user input followed by hitting the ENTER key. 

You output should look like this:

Output:
C:\Python36\python.exe C:/Python/Sound/scratch2.py enter how much you want to save: 100100 enter how much you will be able to pay: 1010 Process finished with exit code 0
We could enter any value (at least those that won't break your code):

Output:
C:\Python36\python.exe C:/Python/Sound/scratch2.py enter how much you want to save: 10055 enter how much you will be able to pay: 10666 Process finished with exit code 0
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#13
Thanks sparks_alot, I managed to fix it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Basic Coding Question: Exit Program Command? RockBlok 3 551 Nov-19-2023, 06:31 PM
Last Post: deanhystad
  Armachat coding problem gad969 4 1,306 Mar-12-2023, 03:12 PM
Last Post: gad969
  Coding problem portfolio grade max70990 1 727 Dec-11-2022, 12:30 PM
Last Post: Larz60+
  coding problem from older book teddfirth 3 2,124 Mar-06-2021, 03:51 PM
Last Post: teddfirth
  [split] Very basic coding issue aary 4 2,449 Jun-03-2020, 11:59 AM
Last Post: buran
  Very basic coding issue mstichler 3 2,573 Jun-03-2020, 04:35 AM
Last Post: mstichler
  Basic example Coding gudlur46 2 2,038 Dec-19-2019, 01:55 PM
Last Post: gudlur46
  Basic programming problem darek88 1 1,982 Sep-30-2019, 01:13 PM
Last Post: ichabod801
  Problem with Basic Rock Paper Scissors code BirinderSingh 3 2,431 Sep-13-2019, 03:28 PM
Last Post: ichabod801
  Basic coding question with Python Than999 3 3,098 Jul-17-2019, 04:36 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020