Posts by Manolloz • 153 points
11 posts
-
5
votes3
answers9397
viewsQ: How to pass arguments by reference in Python?
When I studied Pascal remember that my teacher explained that to pass an argument by reference it was necessary to put var in front of the variable, in the function/procedure parameters. Example:…
-
1
votes2
answers2468
viewsQ: Doubt about Keypress in Pygame
I have a question related to Pygame. I’m starting to move and I found a problem here. When I press the button A(left) I make the image walk to the left, until then everything ok. But if I hold down…
-
-1
votes1
answer219
views -
1
votes0
answers31
viewsQ: Python Website/Forum
My questioning is not exactly about some code, but about where I can argue about. I’m starting in Python and sometimes I have some doubts or questions that do not fit to be asked in Stack Overflow,…
-
2
votes1
answer512
viewsQ: How to delete characters from a string within a Python array
I’m starting in python and decided to mess with files .txt. I did the following procedure to insert values into an array, and from it insert each value into a row of a file filename.txt. def…
-
-1
votes1
answer15277
viewsQ: How to move elements in HTML/CSS
I’ve already searched the internet for how to do it but none of it is working. I created a class calling for .img for testing and when handling it in CSS, use .img{right: 500px;} as a test, but…
-
0
votes1
answer57
viewsQ: Doubt in an equation in Pascal
I’m having a little problem with a code here. The following is requested: Given X as parameter (in degrees), calculate cos(x) with the sum of the first 15 terms of the series below: With the…
-
1
votes2
answers1306
viewsQ: How to use exponent in Pascal?
I have a problem to solve, where the PG formula uses exponent other than two (squared), and cannot use sqrt(). How can I resolve this in Pascal in an intuitive way? I know you can’t use it ** also.…
-
3
votes2
answers5942
viewsQ: How to allow special characters in Python?
In my program I want to include characters like these in the print: , and a few more of these. I’m trying to take an array with numbers and turn them into these characters, so it looks like a…
-
0
votes3
answers2758
viewsA: How to print without line break in Python
Antony Gabriel, the way you went didn’t really break the line, but every 21 I wanted to break. So I did an add-on: def print_matriz(txt): cont = 0 quebra = 0 for j in range(a): for i in range(b): if…
-
1
votes3
answers2758
viewsQ: How to print without line break in Python
matriz = [] def create_matriz(a, b): for contador in range(a): matriz.append( [0] * b ) def print_matriz(txt): cont = 0 for j in range(a): for i in range(b): if txt[cont] == "0": matriz[i][j] = 0…