Onboarding - Puzzle discussion


#1

Feel free to send your feedback or ask some help here!


C# Tutorial 1 questions
#4

Clever smile


#7

Is there a way to see my code from the puzzles I solved? Or something for reusable code?
I tried by using "Solve it" button, but got my code reset frowning


#8

This is strange. It should not happen. Your code should be saved (from your last submission in the puzzle) if you are connected with your codingamer account.

Could you give us a link to your profile page (it is our way to identify you) to check on our side if we can understand the reason of this problem

Thanks


#9

Here is my profile . I have re-writen the code, so the code is back now.
When the reset happen i was on another puzzle and opened a new tab with the puzzle that got later erased. (Maybe this is what it caused it)


#10

Is there somekind of error in the C# version?

I get what I think should be the correct output when doing an error log yet its different with just a writeline. It's like it loops back round over the hotdroids before moving onto buzz.

Even placed after one another in the for loop the output is different.

Thanks.


#11

Why is it that when i set multiple targets. The canon no longer shots fast.


#12

You only can submit one target each round.


#13

I have the same problem.


#14

hello!world!


#15

I think it overwrites your code with template code if you change the language.
I get around this problem by typing code in my IDE and then copy pasting it in.
I save a copy of the project so I can refer back to it later.


#17

The default C code is terrible.

            scanf("%s%d", &enemy, &dist); fgetc(stdin);

fgetc(stdin) is completely useless.
scanf already skips white characters for %d and %sconversion specifiers.


And please, avoid & in front of enemy.
Please, do not harm.


#18

I have the same problem in C#, I tried to debug like this:

Console.Debug.WriteLine(enemy);
Console.WriteLine(enemy);

And I was surprised that the two lines show different output!

Then I tried Python and again I got the same problem.


#19

But each puzzle contains a note that you should use error stream, isn't it?

Console.Error.WriteLine("Here you should get some debug information");


#20

You have 11 moves, you probubly just went :
Console.WriteLine("HotDroid");
Console.WriteLine("Buzz");
Since you can only print 1 name in the console per move, it prints 1st name in 1st move, if its not the correct name, it starts printing the same name in 2nd move, etc... Therefore you waste moves on trying to figure out the name of enemy in range... Hope its a bit clearer


#23

In javascript exists the same bug, show different output at print and printErr function. And can't use 2 print functions at the same status of main loop.


#24

Maybe add a test who force to check speed.


#25

nope, it is just a tutorial smile don't need to overdo it


#26

Could someone tell me what wrong is with this code? This code should resolve 2 first tests from tutorial.
http://pastebin.com/1kEDVFA2


#27

Look at line 22,
look at line 29,
raise an eyebrow...