Skip to content
Advertisement

Tag: python-3.x

Find how many numbers two numbers have in common

So I’m trying to make a program that tells the user how many numbers both inputted numbers have in common FOR EXAMPLE: if inputted n1 = 765 and n2 = 572 then the program returns 2 because both numbers have 7 and 5 in them. I made this but it isn’t working: Answer Use list comprehension and sets instead, like

2 Interactive Poly Editor with matplotlib Not Working

Following a tutorial Poly Editor I’ve created 2 polygons, added to the figure, and then instantiated 2 interactive polygons. I expected that when I adjusted the individual polygon it would work separately. However they were conflicting with each other. Then I have tried some changes in the original code yet still not produce a successful result. If you’re familiar I

Not able to import python files needed in main.py

I have this file structure which i am not too sure is considered good practice. here is the directory structure I am trying to import the content of seed.py and wallet_generation.py into my main.py file. But when I try import the files through a relative path ie (../../bitcoinBackend/seed and ../../bitcoinBackend/wallet_generation) I get errors where the files are not recognized. Im

Cant decode HTTP Response to JSON (Python3)

I am running a series of API tests and this one is giving me an error. As far as I can tell response.read() converts the HTTP response into binary and then decode() converts that binary into a string but it’s an empty string. When I copy paste the binary string into Python3 (b'{“error”: {“code”: “INVALID_TOKEN”, “description”: “”}}’) and issue a

Advertisement