There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Why is it that the example code in the text shows “Console.Write(apple); // prints 1” in both example areas, but that particular line used for the practice gives an error in the console? Should it say "Console.WriteLine(apple); " in the examples?
If you typed Console.Write(steps) for step 4 of the instructions, the error you get is not a compile error. It’s simply a SCT (Submitted Code Tester) error. Whoever wrote the lesson, is expecting you to use Console.WriteLine(steps). Either way, the value of steps is printed to the console, but the SCT for this lesson only accepts the latter. Hope this helps!
Wanted to bring up a flaw in backend coding not allowing steps-- to function properly. WriteLine still shows 2 as the response, even though the task gets set as complete.
Same here. After steps 2 and 3 I’m getting: Program.cs(13,11): error CS0128: A local variable or function named ‘steps’ is already defined in this scope [/home/ccuser/workspace/csharp-working-with-numbers-operator-shortcuts-csharp/e4-workspace.csproj]
But the exercise is still saying it’s correct.