gugtenterf Posted February 6 Report Share Posted February 6 Question- TaskThe provided code stub reads two integers from STDIN, and . Add code to print three lines where: The first line contains the sum of the two numbers. The second line contains the difference of the two numbers (first - second). The third line contains the product of the two numbers. Example Print the following: 8 -2 15 my answer if __name__=='__main__': a=input(int()) b=input(int()) if 1<=a<=10**10 and 1<=b<=10**10: summation = a+b diff = a-b multiply = a*b print(summation) print(diff) print(multiply) error Traceback (most recent call last): File "Solution.py", line 6, in <module> if 1<=a<=10**10 and 1<=b<=10**10: TypeError: '<=' not supported between instances of 'int' and 'str' Quote Link to comment Share on other sites More sharing options...

gugtenterf Posted February 6 Author Report Share Posted February 6 (edited) 3 minutes ago, gugtenterf said: Question- TaskThe provided code stub reads two integers from STDIN, and . Add code to print three lines where: The first line contains the sum of the two numbers. The second line contains the difference of the two numbers (first - second). The third line contains the product of the two numbers. Example Print the following: 8 -2 15 my answer if __name__=='__main__': a=input(int()) b=input(int()) if 1<=a<=10**10 and 1<=b<=10**10: summation = a+b diff = a-b multiply = a*b print(summation) print(diff) print(multiply) error Traceback (most recent call last): File "Solution.py", line 6, in <module> if 1<=a<=10**10 and 1<=b<=10**10: TypeError: '<=' not supported between instances of 'int' and 'str' https://pythondev.online/ thanks in advance for any help Edited February 6 by gugtenterf Quote Link to comment Share on other sites More sharing options...

## Recommended Posts

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Note:Your post will require moderator approval before it will be visible.