1
It’s a simple code, but based on what I’ve seen and been studying about repetition structure right here, I’ve come up with a way to do it, but I’m dealing with the following problem: the value is not being added after the option given by the program is being performed! always giving me as return the value of 0 (zero)!.
follow:
valor = int(input('Valor Solicitado: '))
valor1 = int(0)
while True:
parcelax = input('Qual formato de parcelamento? \n 1) Á Vista \n 2) 12x \n 3) 30x \n 4) 60x \n' )
if parcelax not in {'1','2','3','4'}:
print('Digito incorreto!')
continue
if parcelax == 1:
valor1 = 20
break
print('Olha: {}'.format(valor1))
It is worth commenting that
0
is already an entire value, so doint(0)
is redundancy. You can do onlyvalor1 = 0
.– Woss