Posts by StackOverflowToxicityVictim • 439 points
10 posts
-
1
votes2
answers113
viewsA: Generator Expressions
Generator Expressions has a simple syntax: (expressão for variavel in interavel if condição) if you want all values, you can omit the condition, hence: (expressão, for variavel in iteravel) both are…
-
1
votes0
answers257
viewsQ: Package of graphical interface
I want to start a great project to start learning better Python and some other concepts, I have basic knowledge about the language, I’ve done some scripts, mainly add-ons to the software Blender.…
-
1
votes1
answer218
viewsQ: Is this a scam?
I’m starting in programming, I have some difficulty reading codes even my own after a while. I was a researcher on legibility and came across the term "gambiarra". this raised a question for me.…
-
0
votes1
answer94
viewsQ: a bug in the range() function?
I’ve been writing a function for a class that takes a dictionary and converts it into a string to represent a matrix. def __str__(self): grid_str = ['' for _ in range(self.heigth)] for y in…
-
0
votes1
answer86
viewsQ: Game of life, what’s wrong?
I’m training Python and recently I’ve been trying to recreate the famous "Game Of Life", I managed to avoid code flaws but it is still not behaving properly. The program was to behave this way:…
-
7
votes1
answer392
viewsQ: Create algorithm for fluid simulation?
I want to create a simulation game with Unity and I need to simulate the movement of 2D fluids, I can’t think of a way to create an algorithm with enough performance to simulate a thousand particles…
-
1
votes3
answers2432
viewsA: How to speed up a script to full speed in python?
Thanks, with your help I managed to reach this result: from random import random scale = int(input("quantas amostras ? ")) repeat = int(input("quantas repetiçoes ? ")) pi = 0 def pic(sc): p = 0…
-
11
votes2
answers6367
viewsQ: Open, edit and save a binary file in Python3
It is possible to open a binary file and read its bits in Python3, edit and save a new binary. If possible, such as?
-
5
votes1
answer139
viewsQ: How to run a loop while waiting for input?
I want to know if you can run a repeat loop while waiting for an input type() and right after receiving the loop input for or while starts processing it immediately. something like: imputs = []…
-
4
votes3
answers2432
viewsQ: How to speed up a script to full speed in python?
I was playing with a method to approximate the PI number and I realized that the code runs very slowly in the Python 3.6 interpreter, and the process is only using 30% of the processor. There would…