Study the following python code this code adds two numbers


Study the following Python code. This code adds two numbers. Then increments each number by 1 and displays the result:

(input("Enter the value for x:"))

(input("Enter the value for y:"))

+y

print("x + y = ", z)

x = x + 1

y = y + 1

z = x + y

print ("Add 1 to x and add 1 to y, now z equals ", z)

The program running looks like this:

Walk through the code and explain what the result will be if the input is:

, y = 5

x=-1, y = 3

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Study the following python code this code adds two numbers
Reference No:- TGS01141904

Expected delivery within 24 Hours