Jul-12-2023, 07:50 AM
Not sure exactly what you're trying to do. input takes a users input and store it in variable x. Y does the same thing. If you are not entering a number value for x and y it will error.
If want a default value you could do something like this
If want a default value you could do something like this
x = input('Please enter an integer value: 2') or 2 y = input('Please enter another integer value: 17') or 17 num1 = int(x) num2 = int(y) print(num1, '+', num2, '=', num1 + num2)If you're not wanting user input just store it in a variable.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags