0

explain me something:

I had to change my code because the interpreter that I was using claimed an error. So, my code was: A = int(input("")) B = int(input("")) X = A + B print(f'X = {X}') and I had to change the last line so my new code is: A = int(input("")) B = int(input("")) X = A + B print("X = %d" % (X)) and I wish that someone explain to me that last line because I don't get it.

31st Jan 2019, 3:09 AM
Ana
Ana - avatar
3 Answers
+ 2
Which python version does your interpreter use? f-strings are new to python 3.7 (or 3.6, not sure). The last line of your second code uses a format specifier: https://pyformat.info
31st Jan 2019, 3:28 AM
Anna
Anna - avatar
0
Anna I was using the interpreter from this site: www.urionlinejudge.com.br and I don't know which version it use thanks for your answer 😊
31st Jan 2019, 1:54 PM
Ana
Ana - avatar
0
Try py.charm
2nd May 2019, 6:16 AM
ali
ali - avatar