You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think 03_if/if3.rs is a bit ambiguous. The code to be modified looks like this:
// TODO: Fix the compiler error in the statement below.let identifier = if animal == "crab"{1}elseif animal == "gopher"{2.0}elseif animal == "snake"{3}else{"Unknown"};
which is intuitively indicating to change "Unknown" to an unused identifier, however it still won't work because the compiler will continue prompting for changes until 2.0 is replaced with 2.
Personally it took me a while to figure it out, and that's not the problem, but when I checked the official solution:
let identifier = if animal == "crab"{1}elseif animal == "gopher"{2}elseif animal == "snake"{3}else{// Any unused identifier.4};
the only change mentioned is from Unknown to 4, but there's no explanation that 2.0 must also be changed to 2. I think adding a comment to clarify the necessary type consistency would be very helpful.
The text was updated successfully, but these errors were encountered:
I think
03_if/if3.rs
is a bit ambiguous. The code to be modified looks like this:which is intuitively indicating to change "Unknown" to an unused identifier, however it still won't work because the compiler will continue prompting for changes until
2.0
is replaced with2
.Personally it took me a while to figure it out, and that's not the problem, but when I checked the official solution:
the only change mentioned is from
Unknown
to4
, but there's no explanation that2.0
must also be changed to2
. I think adding a comment to clarify the necessary type consistency would be very helpful.The text was updated successfully, but these errors were encountered: