This will not fix the problem, but will give you more info: save the file to disk and try running it outside of Sublime. Open a command line and run ``python your_file.py`. If it works, that will tell you that the problem is related to Sublime. If it fails like in Sublime, then there is something weird happening... and I have no idea what that could be.
it works!, oh but that must mean there is something wrong with sublime then.
that must mean there is something wrong with sublime then.
Yeah, sorry, I cannot help with that, never used Sublime.
But at least you can use the command line until you figure that out. Not ideal, but better than nothing ¯\_(ツ)_/¯.
ah thank you, i'd never figured it out! well, I guess i'll just find some other software to view it then. but yeah thanks!
Use VSCode or PyCharm. It's what most people use anyways.
Give both a try. VSCode is lightweight and a bit more "manual". PyCharm is a full IDE with advanced features but sometimes it can be too much for a small script.
I can't see anything wrong with your code other than a typo in line 3 (fist should be first), and the fact that you use sum (a predefined function) as a variable. The latter should not cause any issues, unless you want to use that function at a later point in time.
Forgive me for asking a basic question, but it does sound like you're not pressing the enter key after entering your first number.
I believe I press enter after inputting. but let me try again to make sure.
yeah i did, but still nothing.
That's weird. Have tried running it without the help of sublime?
Sublime does not support input via it's integrated output.
It looks like a CLI, but it is not. There are probably ways to do this, but it's just easier to use IDLE, be aware of getting flashbanged.
Python
Welcome to the Python community on the programming.dev Lemmy instance!
📅 Events
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django 💬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
🐍 Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
💓 Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
✨ Python Ecosystem:
🌌 Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- Pythörhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API