Posts by Gabriel da Silva Santos • 64 points
6 posts
-
-1
votes2
answers36
viewsA: How to use a function inside variable on out of function?
I managed to fix your code like this I declared the variable v1 out of function, and the Return went straight to it v1 = True def test(x, y): if x == y: v1 = False else: v1 = True return v1 v1 =…
-
0
votes1
answer35
viewsQ: Program usually runs but has moments that stops in the middle of execution and does not leave the place
This program is to draw numbers for the mega sena. I got the result I wanted, but there are moments that the program stops in the middle or at the beginning of the execution. The user places the…
-
0
votes4
answers84
viewsQ: Error when using index to pick up a specific index
I would like to take the position from where the highest entered value is within the list. I am trying with the index but am not getting. for c in range(0, 5): num.append(int(input('Digite 5…
pythonasked Gabriel da Silva Santos 64 -
0
votes2
answers82
viewsQ: How to store different values in a single variable
I wanted to take a variable and store different values. In this case, it would be 7 ages, how to do? cont = 0 anos = 0 for c in range(1, 8): cont += 1 anos = int(input('Em que ano a {} pessoa…
-
-2
votes1
answer1126
viewsQ: I cannot place the image next to the title using tag link
<title>Biografia - João da Silva</title> <meta charset="utf-8"> <link rel="icon" href="favicon.png"> <h1>Sobre mim</h1> <p>Moro em São Paulo mas atendo…
-
0
votes2
answers70
viewsQ: Conditional operator ?: not working
I’m having trouble using the ?: #include <stdio.h> int main() { int num1 = 10; int num2 = 20; int resposta; num1 < num2 ? printf("sim\n") : printf("nao\n"); // O erro acontece aqui ao…