Main thread

What is the expected output when a negative number is given as the first number? (The program crashes because cnt is zero…).

Is that one of the use-cases to ignore?

Yes - you may assume this will not happen (i.e. at least 1 positive number).

Is it ok if I add "else" after the "if" in the skeleton for question 4a?

Or should I use only "if"?

Because I also managed to solve it also without using the "if" conditional at all.

Thanks in advance

Maor

Can someone explain to me (again) what exactly are we calculating in 4a? Should i set the maxx to whatever i want or am i missing something? I understand that a person has to enter a sequence of numbers, while a certain condition holds, and then it returns the max number out of the numbers entered and the average of the numbers entered. What I am confused about is the condition for while and if.

כדי לדעת במה לאתחל את maxx חשבי על אופן חישוב הערך המקסימלי של סדרת המספרים.

לגבי תנאי עצירת הלולאה, קראי שוב את גוף השאלה.