How? >>> int("2") + int("3") 5 and int("2"+"3")23 in ques | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
0

# How? >>> int("2") + int("3") 5 and int("2"+"3")23 in ques

Help me pls

15th Oct 2019, 8:46 PM
MODI GAM
12 Respostas
+ 4
>>> int("2") + int("3") = 5 Here we are first converting string to int so it will add. Because you can add integer values. >>> int("2" + "3") = 23 In this case first we concating string so here first will be "23" Then by int("23") will be 23.
15th Oct 2019, 10:56 PM
AĶ¢J
+ 1
MODI GAM Don't spam. You already asked in question and giving same thing in answer. What is it?
15th Oct 2019, 10:58 PM
AĶ¢J
+ 1
Jenny š¤ Maybe on your reply because this is discussion thread not for such type of things. You should tell the solution not unusual comments.
16th Oct 2019, 5:28 AM
AĶ¢J
+ 1
AJ || ANANT || AC || ANANY || AY oh sorry, i only started consistently using sololearn like two days ago. didnt see anywhere that you can only reply with solutions
16th Oct 2019, 5:43 AM
ź§ą¼ŗ Jenspi ą¼»ź§
+ 1
>>> int(" 2 + 3") = 23 plus be happy
8th Dec 2019, 9:44 PM
Alexander Paramonov
0
someone really downvoted me for that i?? okay
16th Oct 2019, 12:41 AM
ź§ą¼ŗ Jenspi ą¼»ź§
0
It's string addition not the integer addition. For eg="2"+"3"="23". And if you want answer 5 you can do eval("2+3")="23".
16th Oct 2019, 3:16 PM
- 2
No
15th Oct 2019, 8:54 PM
MODI GAM
- 2
>>> int("2") + int("3") 5
15th Oct 2019, 8:55 PM
MODI GAM
- 2
>>> int("2" + "3") 23
15th Oct 2019, 8:55 PM
MODI GAM
- 2
Ooo sorry i see O.o
15th Oct 2019, 8:56 PM
MODI GAM
- 2
Thanks
15th Oct 2019, 8:56 PM
MODI GAM
Quente hoje
Challenge