Posts by lucas • 79 points
6 posts
-
-1
votes0
answers26
viewsQ: Datetime does not recognize strftime
I’m trying to make a code that receives a date in the format of String, this way '2021-8-24', year month day, but I will convert to date, only the terminal speaks: data_converted =…
-
1
votes2
answers55
viewsQ: How to catch the smallest hints from the list, but only from Dice 0 to 1
z = [-4, -1, 0, 0, 0] F1 = [ 9, 1, 1, 0, 18] F2 = [ 3, 1, 0, 1, 12] #Pega a posição do menor valor das listas n_min_z = min(z) n_min_F1 = min(F1) n_min_F2 = min(F2) #Guarda a posição em uma variavel…
-
-3
votes1
answer54
viewsQ: Result is always 404, but the records exist. Where can the error be?
POST /sinalizar_interesse/9/3/ means that 9 is interested(a) in 3. Code: def localiza_id(id_usuario): for pess in database['PESSOA']: if pess['id'] == id_usuario: return 200 return 404…
-
2
votes1
answer331
viewsQ: Top 3 the biggest numbers in the list and their indexes
I have the list [5, 7, 2]. I need to create another list containing the indexes in this list, ordered so that the first index corresponds to the largest element in the list, the second corresponds…
-
2
votes1
answer27
viewsQ: Record an index-specific value and treat the values
The number of Likes is cumulative, that is, if the post has 0 Likes and receives 5 Likes, it will have 0 + 5 =5 Likes. If soon, this same post receives 7 Likes, will have 5 + 7 = 12 Likes. If the…
-
1
votes2
answers5692
viewsQ: How to print all the contents of a list in Python
How do I print contents from a list? I want the output to look like this: Indice: 0 1 2 ... likes: 0 0 0 ... A post is represented as an element of a list. The list index indicates the post number.…