1,444 questions
Advice
0
votes
5
replies
172
views
How does Python handle floating point numbers when the round function is also involved?
I am seeing 2 different versions of the result which IDLE popped out. Here is the input and iutput of IDLE Shell. I don't understand how this can even happen.
round(12.675,2)
12.68
f"{12.675:.20f}...
Score of 1
1 answer
94 views
Why does sklearn GaussianMixtures spawn a cmd window when run from IDLE?
When I run this code using IDLE in windows, it spawns a temporary cmd window that disappears shortly thereafter.
import numpy as np
import matplotlib.pyplot as plt
from sklearn.mixture import ...
Score of 0
2 answers
63 views
python -m idlelib Switch to specific py version
MultiProcessing doesn't correctly show results in IDLE's output window, but it does show in IntelliJ / commandPrompt's Output window.
I'm trying to run:
python -m idlelib
But my environment variable ...
Score of -1
4 answers
157 views
Different outputs depending on different IDE used? [duplicate]
So I'm learning Python in a Coursera Google course, which provides instructional code inside a Jupyter notebook page. But in addition to the Jupyter page, I primarily use the IDLE Shell and scratchpad ...
Score of 0
2 answers
59 views
VS code for Python does not show the contents of the variable after the codes are executed
I have a simple Python code written in VS code to print an array:
import numpy as np # Importing the NumPy library
# Creating a 1D array
array_1d = np.array([1, 2, 3, 4, 5])
print("1D Array:&...
Score of -1
1 answer
1682 views
restart:shell as output when trying to connect mysql with python [duplicate]
import mysql.connector
mydb = mysql.connector.connect(host="localhost", user="root", password="123456")
if mysql.connector.is_connected():
print("connected")...
Score of 1
0 answers
149 views
Tkinter by python doesn't work in Visual Studio Code, only in IDLE
I am a beginner developer and I've been trying to code some basic tkinter shapes. When I run it in the pyhon-mage ide called IDLE, there is no problem. However, when I try to run it in Visual Studio ...
Score of 0
0 answers
183 views
IDLE/Tkinter Error: no display name and no $DISPLAY environment variable
Traceback (most recent call last):
File "/usr/bin/idle", line 5, in \<module\>
main()
File "/usr/lib/python3.10/idlelib/pyshell.py", line 1617, in main
root = Tk(...
Score of 0
1 answer
84 views
Why is code copied from IDLE always rejected?
I am unable to persuade this system to accept my question because it tells me that I should indent my code by 4 spaces. As far as I can tell it is all properly indented, as it runs properly within ...
Score of 0
2 answers
220 views
Using cmd to run IDLE
I an unable to run Python IDLE using command prompt on windows 10 OS.
C:\Windows\System32>IDLE
'IDLE' is not recognized as an internal or external command,
operable program or batch file.
C:\...
Score of 0
1 answer
89 views
Import pandas not working, showing "RESTART: shell"
whenever im using import pandas as pd it isn't working other than that anything like import math module is working.
it shows "RESTART: shell".
i am unable to install any other IDE so i am ...
Score of 1
0 answers
53 views
python code not working properly in python terminal but working in idle editor
I am using python to encrypt and decrypt stream ciphers. It works perfectly fine on the idle editor shell when I run it but I get messed up outputs when I try to run the code with the python terminal (...
Score of 0
0 answers
318 views
Infinite Loops, Ctrl + C, and Python IDLE Shell
I'm very new to programming and am learning Python through Automate the Boring Stuff. I'm looking at While Loops and put the following into the file editor window:
name = ''
while name != 'your name':
...
Score of 0
3 answers
618 views
How to change the menu font size in IDLE?
While I'm using Python's IDLE, the font size of menus and submenus is very small.
In the editor window the font size is 14. On a large 4K monitor, working with files is fine but sometimes if I need to ...
Score of 1
1 answer
815 views
Cannot wrap text in the new Python IDLE 3.12.2 on Windows
I am unable to wrap text in the script window in Python IDLE 3.12.2 . I saw the previous solutions of clicking on Configure IDLE and then clicking on the General Tab, but this does not exist anymore.
...