Ad
  • Custom User Avatar

    isn't understanding it the point? (real question here) i mean if not understand it what's the point do we learn either way cause that is a concern to me
    experience thought me different but honestly my experience was useless so far on my journey learning programming

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    thanks. that helped. a lot. :)

  • Default User Avatar

    that's not correct. a starts as the string in front of the variable.
    for example in "(x+7)^12" it is the empty string "", in "(-x+7)^12" it is the minus sign "-", and in "(0x+7)^12" it is the digit zero "0".
    in the second line this string is transformed to the numerical value. so for example "" turns into 1, "-" turn into -1 and "0" turns into 0.
    now if a is 0 then the variable isn't relevant and we only have to compute 7^12.

  • Custom User Avatar

    one thing i don't get about this cool code is that "a" is defined to be "1" if it was 0 in the second line.
    but for the first "else if" conditioning again you have the condition to whether a is 0 do smth. can anyone please clarify to me?