Run program above by clicking Memory Graph Web Debugger%0Anum1%20%3D%20float(input(%22Enter%20first%20number%3A%20%22))%0Anum2%20%3D%20float(input(%22Enter%20second%20number%3A%20%22))%0A%0Aprint(%22%5CnSelect%20operation%3A%22)%0Aprint(%221.%20Addition%20(%2B)%22)%0Aprint(%222.%20Subtraction%20(-)%22)%0Aprint(%223.%20Multiplication%20(%C3%97)%22)%0Aprint(%224.%20Division%20(%C3%B7)%22)%0Achoice%20%3D%20input(%22Enter%20choice%20(1-4)%3A%20%22)%0A%0Aif%20choice%20%3D%3D%20'1'%3A%0A%20%20%20%20result%20%3D%20num1%20%2B%20num2%0Aelif%20choice%20%3D%3D%20'2'%3A%0A%20%20%20%20result%20%3D%20num1%20-%20num2%0Aelif%20choice%20%3D%3D%20'3'%3A%0A%20%20%20%20result%20%3D%20num1%20*%20num2%0Aelif%20choice%20%3D%3D%20'4'%3A%0A%20%20%20%20if%20num2%20!%3D%200%3A%0A%20%20%20%20%20%20%20%20result%20%3D%20num1%20%2F%20num2%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Error!%20Cannot%20divide%20by%20zero.%22)%0Aelse%3A%0A%20%20%20%20print(%22Invalid%20choice!%20Please%20select%201-4.%22)%0A%0Aif%20choice%20in%20%5B'1'%2C%20'2'%2C%20'3'%2C%20'4'%5D%20and%20(choice%20!%3D%20'4'%20or%20num2%20!%3D%200)%3A%0A%20%20%20%20print(f%22Result%3A%20%7Bresult%7D%22)×tep=1) and see its state change step by step.
Run program above by clicking Memory Graph Web Debugger%0Anum1%20%3D%20float(input(%22Enter%20first%20number%3A%20%22))%0Anum2%20%3D%20float(input(%22Enter%20second%20number%3A%20%22))%0A%0Aprint(%22%5CnSelect%20operation%3A%22)%0Aprint(%221.%20Addition%20(%2B)%22)%0Aprint(%222.%20Subtraction%20(-)%22)%0Aprint(%223.%20Multiplication%20(%C3%97)%22)%0Aprint(%224.%20Division%20(%C3%B7)%22)%0Achoice%20%3D%20input(%22Enter%20choice%20(1-4)%3A%20%22)%0A%0Aif%20choice%20%3D%3D%20'1'%3A%0A%20%20%20%20result%20%3D%20num1%20%2B%20num2%0Aelif%20choice%20%3D%3D%20'2'%3A%0A%20%20%20%20result%20%3D%20num1%20-%20num2%0Aelif%20choice%20%3D%3D%20'3'%3A%0A%20%20%20%20result%20%3D%20num1%20*%20num2%0Aelif%20choice%20%3D%3D%20'4'%3A%0A%20%20%20%20if%20num2%20!%3D%200%3A%0A%20%20%20%20%20%20%20%20result%20%3D%20num1%20%2F%20num2%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Error!%20Cannot%20divide%20by%20zero.%22)%0Aelse%3A%0A%20%20%20%20print(%22Invalid%20choice!%20Please%20select%201-4.%22)%0A%0Aif%20choice%20in%20%5B'1'%2C%20'2'%2C%20'3'%2C%20'4'%5D%20and%20(choice%20!%3D%20'4'%20or%20num2%20!%3D%200)%3A%0A%20%20%20%20print(f%22Result%3A%20%7Bresult%7D%22)×tep=1) and see its state change step by step.