Questions tagged [python-3.10]

A version of the Python programming language, first released on October 4, 2021. This tag is for issues that are specific to Python 3.10. For general questions use the more generic [python] tags.

Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation.

References

782 questions
-2
votes
1 answer

No attr named query

Okay so I'm programming a Wolfram Alpha API and I added a res string with query and its giving me this error: AttributeError: 'str' object has no attribute 'query' Here's the PyDa.py: import PySimpleGUI as sg sg.theme('Dark…
TedDev
  • 3
  • 2
-2
votes
2 answers

TypeError in Python3.10 script

I am trying to do network automation task using python but ran with type error while running the below given script. I AM STUCK AT SAME KIND OF ERROR, CAN YOU GUYS PLEASE HELP ME OUT HOW TO FIX THIS ?* durai@durai-virtual-machine:~/Network…
-2
votes
2 answers

Turtle issue with vs code

Hi this is my first time trying to code video games in python. So I found a tutorial video that was ran on the same opperating system as mine (mac) but when I wrote the setup in the video: #Setup import…
-3
votes
2 answers

Python opens new windows to run script?

print("test") m = input("Name: ") print(m) I was getting ready to start programing. I opened cmd and ran my program and it opened a new cmd and printed out my code. Why is python opening a new cmd window to run my script unstead of using the cmd…
Rob
  • 1
  • 1
-3
votes
1 answer

Python undefined behavior regarding bytes and bytearrays

I am facing some problems with Python3 Bytes/Bytearrays, and I am quite sure that something is not quite right. I tried contacting Microsoft, but they are taking too long to answer, and the problem is hampering my work. Currently using Microsoft…
-3
votes
1 answer

How to manually exit the match-case statement?

How can we exit the match-case statement ahead of time? Is it even possible? break and continue are only possible within loops test = "b" match test: case "a": print("a") case "b": print("b") if…
ATH
  • 666
  • 6
  • 13
-3
votes
1 answer

How do I install a virtual environment in python as a beginner

I'm new to programming and i see lots of post saying you have to create a virtual environment for better experience while working on a python project, and i can't really wrap my head on that..... First question, why do I need a virtual…
Lyrixs
  • 3
  • 2
-3
votes
1 answer

Failed to install scikit-learn but it could not in python 3.10 in jupyter notebook in window 8.1

ERROR: Command errored out with exit status 1: command: 'G:\python\python.exe' 'G:\python\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Zaid\AppData\Local\Temp\tmp9x904_3n' cwd:…
-3
votes
2 answers

i was creating a REST api using flask and while i was about to test it on postman I saw that error

File "c:\Users\kally\rest\code\app.py", line 3, in from flask_jwt import JWT File "C:\Users\kally\AppData\Roaming\Python\Python310\site-packages\flask_jwt\__init__.py", line 16, in import jwt File…
-4
votes
1 answer

How can I use two or more lambda in one function?

Imagine I have a function like this: def func(x): a = lambda b : x + b a = lambda c : a * c return a; How can I give an argument to the second lambda? Is this even possible, by the way? And I was thinking: Is there a way to give one…
-4
votes
1 answer

My vscode python codes files which is not opening in vscode

I have many python code files of my course which used to open in vscode, now unfortunately it's not opening in vscode. Please can anyone help me.
-4
votes
1 answer

How to read and write into another text file having numbers, strings and special characters

I have a text file with the below numbers, strings and special characters. 63 148 77 358765 Orange 44.7 14 % 61 80 ** How to read the file and write into another file with only odd numbers. Here's my rough code with open("Odd-Numbers.txt", "r") as…
Karyala
  • 13
  • 6
-6
votes
1 answer

Python Mathematical Operation Bug

Trying to perform that calculation but it fails. Is that a bug? Python 3.10.5
ghostcasper
  • 99
  • 2
  • 7
1 2 3
51
52