Posts by Gustavo • 9 points
2 posts
-
-2
votes1
answer28
viewsA: How do I know if a list has several equal values?
You can use a for to compare all list elements with the value you are looking for. cartas_jogador = [1,2,8,4,5,6,7,8] for carta in cartas_jogador: valor_objetivo = 8 if carta == valor_objetivo:…
-
1
votes1
answer16
viewsQ: How to hide decimals in pascal?
I’m making a currency converter and I’m having trouble with the decimals, for example: "$1.0 equals R$ 0.18248175182481752" I would like to know how to hide the decimals from the second house. The…