Problem 😊 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Problem 😊

Good morning everyone! 😊 I have a little problem with this code but I can not understand what is wrong? 😱 Can you give me some information trying to make me understand what approach I have to have when these kinds of problems arise? 😊 Thank you all! https://code.sololearn.com/c07LKe82EWR0/?ref=app

30th Jun 2018, 7:38 AM
<StraMa/Design>
<StraMa/Design> - avatar
7 Answers
+ 6
ok problem error solved!!👍 Thank you so much!👊 But now I do not understand why the program does not do what it should... https://code.sololearn.com/c07LKe82EWR0/?ref=app
30th Jun 2018, 8:07 PM
<StraMa/Design>
<StraMa/Design> - avatar
+ 6
You're right I had to change it in English before asking 😂 sorry 😊. I expected that the "sum" joined the for loop calculate the sum of the squares and then the conditions if they would have chosen if the number was a "Happy Number" or not as desired 'exercise 😊
30th Jun 2018, 9:16 PM
<StraMa/Design>
<StraMa/Design> - avatar
+ 6
do you talk about the pseudocode, right? 🤔 I do not usually do it because I'm not very practical about how to do it 😞
1st Jul 2018, 12:13 PM
<StraMa/Design>
<StraMa/Design> - avatar
+ 6
I usually use the data of the problem to do some research and I go to trial
1st Jul 2018, 12:16 PM
<StraMa/Design>
<StraMa/Design> - avatar
+ 2
Look again at the error... what does it say?
30th Jun 2018, 8:20 AM
Qwertiony
Qwertiony - avatar
+ 1
Italian in code so confusing... :) What do you expect from it if for example you pass in the number 4? or 44? What out put is expected from somma(4), somma(44)?
30th Jun 2018, 8:44 PM
Qwertiony
Qwertiony - avatar
+ 1
I mean, what are the actual steps your program performing? like: 1. get number from user 2. pass number to somma func 3. ... ... ... finaly. output something
30th Jun 2018, 9:35 PM
Qwertiony
Qwertiony - avatar