This is the code:
num_1 = "" num_temp = "" num_final = "" while True: num_1 = input("Enter an integer: ") if num_1.isdigit(): num_final = num_temp + num_1 num_temp = num_final else: print(num_final) breakand this is the output after I input 3 and then 4:
Output:Enter an integer: 3
Enter an integer: 4
What I don't understand is why the second output is not seven in accordance with num_temp = num_final. Why code doesn't have memory on previous entry?