Lab Description:
In this lab I learned how to assign values to letters and evaluate it using python. I tried out few, with the addition, subtraction and multiplication and it worked. I gain some experienced while practicing on this lab because at first I couldn’t figure out what I was doing but later I did it with ease.
Code:
input(” Press enter to continue”)
x = eval (input(“Enter a number for x:”))
y = eval (input(“Enter a number for y:”))
print(“x + y =”)
print(x + y)
print(“x – y =”)
print(x – y)
print(“x / y =”)
print( x / y)
print(“x * y =”)
print(x * y)
print(“x % y=”)
print(x % y)
print(“x < y”)
print(x < y)
print(“x == y”)
print(x == y)
print(“x > y”)
print(x > y)
SCREENSHOTS: