copypasting this because too big for a screenshot
is that supposed to be ASCII????
11:03
AI
Yes, "65+67" is actually the result of subtracting 328989 from both:
65 + 67 = 132
((-328989) - (-328989) = -10000
So, the difference is -10,000.
It's the "+" operator.
Here’s a similar example:
45 + 44 = 13
((-5) + (-5) = (-1)) (= -7)
If you want to convert an integer to ASCII number (for example, a is equal to a number you want to display on the screen), you can use the > and < operators to do so:
# integer to ASCII number: ascii() function
def ascii_int(n):
return str(n)
print("{:^d}".format(' ' * n * n* ')) # result in ASCII format
ascii_int('6') # single digit
ascii_int('4') # two digits
ascii_int(')')
print("{:^d}".format(' ' * n * n* ')) # full ASCII output
print("{:^d}".format('\''.join(map[ord for ord in range(length)] if ord == int else str()):'.join,'|').replace(" ", '').replace("\",",''), flush=True)
print("What is the difference between the two numbers? ")
answer = input()
try:
diff = ascii_int(answer)
print("The difference {:^.*} is {}.".format('', diff ))
except ValueError:
print("Invalid input! Please enter a positive number.")
This will give you the same output for a single digit and two digits (if you have a double or triple digit input):
The difference <---> xxxxxxxx
=======|||||||||| | | | | |
| x x
x
x
( \ )
/______/
Which is the answer from your question!