Posts by Vinicius Sartori • 33 points
3 posts
-
-1
votes1
answer42
viewsQ: How to assign the result of a while/for to a list so it can operate with the values
n = int(input("what range?")) f1=0 f2=1 cont = 1 while cont <= n: f3 = f1 + f2 f1 = f2 f2 = f3 if f3 % 2 == 0: print(f3) # Como eu somo os valores de f3 ou transformo ele em uma lista? cont += 1…
-
1
votes2
answers87
viewsQ: How to define which inputs will be accepted by the code?
I have a code where as the user enters data, I want to create a list that will be used for operations later. Output input would be the key "f" interrupting the repeat structure and initiating…
-
-3
votes2
answers126
viewsQ: How to operate on the counter of a while in each loop iteration
Sorry my ignorance I’m starting to learn python now, my doubt is: How can I generate a result in each iteration of a while. valor= input('digite o numero desejado:') contador = 0 while contador…