0

How to input two digit no. and then print the sum of there digits.

12th Aug 2019, 8:42 AM
Raj Singh
3 Réponses
+ 4
There are a variety of methods to achieve that. What have you tried? It would facilitate your learning process if you can show your code.
12th Aug 2019, 8:49 AM
Hatsy Rei
Hatsy Rei - avatar
0
Please show your own attempt. We aren't here to do your homework😉
12th Aug 2019, 9:45 AM
Trigger
Trigger - avatar
0
Do you mean-- 23 -> 2 + 3 = 5? If so... Get the two digits (I'm sure you know how to do that), which returns string by default, the do..... my_sum = int(my_num[0] + int(my_num[1].
12th Aug 2019, 8:24 PM
rodwynnejones
rodwynnejones - avatar