Posts by Pedro Abreu • 509 points
10 posts
-
1
votes1
answer90
viewsA: Doubt Python, as a list is iterated in a repeat
The problem you are having is just before the one quoted in the second for: for i,j in friendship: users[i]["friends"].append(users[j]) #adicion i como um amigo de j…
pythonanswered Pedro Abreu 509 -
18
votes1
answer520
viewsQ: What am I supposed to understand when they say ". NET"?
I’m starting to learn C#. I already understand what the Runtime and what is CLI, but turns and moves quote . NET as if it was something I should already know, but I do not understand. Just say . NET…
-
1
votes1
answer85
viewsA: Doubt about cryptography
plaintext is the text you want to encrypt. While password is the key to protection. To decrypt you will need to use the function decrypt passing as argument the same password used in the function…
-
3
votes1
answer224
viewsA: How to print the first 12 terms of the Fibonacci sequence in reverse in Pascal?
The simplest way is to start the iteration already with the value of the 12th number and the 11th number and subtract them until you reach the initial values of the sequence: program Exercicio_31;…
-
0
votes2
answers1377
viewsA: How to start a Python application with Windows?(cx_freeze)
Try using the folder C: Programdata Microsoft Windows Start Menu Programs Startup Don’t forget to make sure you’re running your program as an administrator.…
-
0
votes1
answer62
viewsA: Exception in file . py
The mistake you’re making is that zat_id is being accessed without being set in: ID = zat_id[0] ID = zat_id[0].strip('UserId=') K1 = zat_id[1] K1 = zat_id[1].strip('k1=') However except will take…
-
1
votes2
answers363
viewsA: How to return letters between points using a regular expression?
Simply use [^\.]+ This regex will take everything that is not a point. However what you suggest to enumerate each group of characters is not possible as regex cannot "count". At most you can catch…
-
1
votes3
answers610
viewsA: Regular expression for email in C++
The problem you’re having is that @[A-Z0-9.-]+ is considering a point, we don’t want this behavior. I didn’t quite understand them bs played by the question regex, but making some tests to regex…
-
2
votes1
answer54
viewsA: Delete function from list
The problem is that you are trying to call temp.getNext(). getNext(), but the first call of getNext() can return null, and this is not being checked. First we must check if the head is non-zero…
-
6
votes1
answer150
viewsA: What it means to infix on Haskell
Infixed notation means that the operator comes between operands, for example 1 + 1. Functions in Haskell usually use fixed notation, for example pow 1 2. The r or l refers to the association, r for…