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
MODI GAM - avatar
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
A͢J - avatar
+ 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
A͢J - avatar
+ 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
A͢J - avatar
+ 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 ༻꧂
꧁༺ Jenspi ༻꧂ - avatar
+ 1
>>> int(" 2 + 3") = 23 plus be happy
8th Dec 2019, 9:44 PM
Alexander Paramonov
Alexander Paramonov - avatar
0
someone really downvoted me for that i?? okay
16th Oct 2019, 12:41 AM
꧁༺ Jenspi ༻꧂
꧁༺ Jenspi ༻꧂ - avatar
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
Lucky Yadav
- 2
No
15th Oct 2019, 8:54 PM
MODI GAM
MODI GAM - avatar
- 2
>>> int("2") + int("3") 5
15th Oct 2019, 8:55 PM
MODI GAM
MODI GAM - avatar
- 2
>>> int("2" + "3") 23
15th Oct 2019, 8:55 PM
MODI GAM
MODI GAM - avatar
- 2
Ooo sorry i see O.o
15th Oct 2019, 8:56 PM
MODI GAM
MODI GAM - avatar
- 2
Thanks
15th Oct 2019, 8:56 PM
MODI GAM
MODI GAM - avatar