Post History
Python 3, 58 39 bytes P1: print(f"print(int(input())+{input()})") Try it online! P2 (given I inputted 10, 30 22 bytes): print(int(input())+10) Try it online!
Answer
#3: Post edited
# [Python 3], 58 bytes- P1:
- <!-- language-all: lang-python -->
x=input();print(f"x={x};y=int(input());print(x+y)",end='')[Try it online!][TIO-kqp3bwg7]P2 (given I inputted `10`, 30 bytes):- <!-- language-all: lang-python -->
x=10;y=int(input());print(x+y)[Try it online!][TIO-kqp3ctrw]- [Python 3]: https://docs.python.org/3/
[TIO-kqp3bwg7]: https://tio.run/##K6gsycjPM/7/v8I2M6@gtERD07qgKDOvRCNNqcK2uqLWutIWxIPKwSQrtCs1lXRS81Js1dU1//83NAAA "Python 3 – Try It Online"[TIO-kqp3ctrw]: https://tio.run/##K6gsycjPM/7/v8LW0MC60jYzr0QjM6@gtERDU9O6oAjErdCu1Pz/39AIAA "Python 3 – Try It Online"
- # [Python 3], <s>58</s> 39 bytes
- P1:
- <!-- language-all: lang-python -->
- print(f"print(int(input())+{input()})")
- [Try it online!][TIO-kqpr6t4q]
- P2 (given I inputted `10`, <s>30</s> 22 bytes):
- <!-- language-all: lang-python -->
- print(int(input())+10)
- [Try it online!][TIO-kqpr8u8t]
- [Python 3]: https://docs.python.org/3/
- [TIO-kqpr6t4q]: https://tio.run/##K6gsycjPM/7/v6AoM69EI00JQkNwQWmJhqamdjWUVauppPn/v6EBAA "Python 3 – Try It Online"
- [TIO-kqpr8u8t]: https://tio.run/##K6gsycjPM/7/v6AoM69EA4ILSks0NDW1DQ00//83NAIA "Python 3 – Try It Online"
#2: Post edited
- # [Python 3], 58 bytes
- P1:
- <!-- language-all: lang-python -->
- x=input();print(f"x={x};y=int(input());print(x+y)",end='')
- [Try it online!][TIO-kqp3bwg7]
P2 (given I inputted `10`):- <!-- language-all: lang-python -->
- x=10;y=int(input());print(x+y)
- [Try it online!][TIO-kqp3ctrw]
- [Python 3]: https://docs.python.org/3/
- [TIO-kqp3bwg7]: https://tio.run/##K6gsycjPM/7/v8I2M6@gtERD07qgKDOvRCNNqcK2uqLWutIWxIPKwSQrtCs1lXRS81Js1dU1//83NAAA "Python 3 – Try It Online"
- [TIO-kqp3ctrw]: https://tio.run/##K6gsycjPM/7/v8LW0MC60jYzr0QjM6@gtERDU9O6oAjErdCu1Pz/39AIAA "Python 3 – Try It Online"
- # [Python 3], 58 bytes
- P1:
- <!-- language-all: lang-python -->
- x=input();print(f"x={x};y=int(input());print(x+y)",end='')
- [Try it online!][TIO-kqp3bwg7]
- P2 (given I inputted `10`, 30 bytes):
- <!-- language-all: lang-python -->
- x=10;y=int(input());print(x+y)
- [Try it online!][TIO-kqp3ctrw]
- [Python 3]: https://docs.python.org/3/
- [TIO-kqp3bwg7]: https://tio.run/##K6gsycjPM/7/v8I2M6@gtERD07qgKDOvRCNNqcK2uqLWutIWxIPKwSQrtCs1lXRS81Js1dU1//83NAAA "Python 3 – Try It Online"
- [TIO-kqp3ctrw]: https://tio.run/##K6gsycjPM/7/v8LW0MC60jYzr0QjM6@gtERDU9O6oAjErdCu1Pz/39AIAA "Python 3 – Try It Online"
#1: Initial revision
# [Python 3], 58 bytes P1: <!-- language-all: lang-python --> x=input();print(f"x={x};y=int(input());print(x+y)",end='') [Try it online!][TIO-kqp3bwg7] P2 (given I inputted `10`): <!-- language-all: lang-python --> x=10;y=int(input());print(x+y) [Try it online!][TIO-kqp3ctrw] [Python 3]: https://docs.python.org/3/ [TIO-kqp3bwg7]: https://tio.run/##K6gsycjPM/7/v8I2M6@gtERD07qgKDOvRCNNqcK2uqLWutIWxIPKwSQrtCs1lXRS81Js1dU1//83NAAA "Python 3 – Try It Online" [TIO-kqp3ctrw]: https://tio.run/##K6gsycjPM/7/v8LW0MC60jYzr0QjM6@gtERDU9O6oAjErdCu1Pz/39AIAA "Python 3 – Try It Online"