I’m trying to solve this task, however when I hit play, it just goes white a bit and then back, no warning no nothing.
I’ve even tried to reset the content of the code to default, it still won’t run at all.
I’ve logged out and logged back in.
Any idea?
I’m using Windows 10 with Edge browser.
Thanks in advance.
Hi RobotX,
I’ve just tried the task and it looks fine to me - there is output and etc. Can you please post your code? Codeasy has a prevention system for many things, like infinite loops, for example. Maybe you managed to break it anyway
using System;
namespace InputValidation
{
class PasswordValidator
{
static void Main(string[] args)
{
string password;
int length;
// You code here
bool lengthCheck = true;
bool uppercaseCheck = true;
bool digitCheck = true;
while (lengthCheck || uppercaseCheck || digitCheck)
{
// lengthCheck = true;
uppercaseCheck = true;
digitCheck = true;
password = Console.ReadLine();
length = password.Length;
if (length < 8)
{
lengthCheck = true;
Console.WriteLine("Password length should be 8 symbols or more.");
}
else
{
lengthCheck = false;
}
for (int i = 0; i < length; ++i)
{
if (char.IsUpper(password[i]))
{
uppercaseCheck = false;
i = length;
}
}
if (uppercaseCheck)
{
Console.WriteLine("Password should contain at least one uppercase letter.");
}
for (int j = 0; j < length; ++j)
{
if (char.IsNumber(password[j]))
{
digitCheck = false;
j = length;
}
}
if (digitCheck)
{
Console.WriteLine("Password should contain at least one digit.");
}
}
Console.WriteLine("Your password is properly set!");
}
}
}
Even if I reset the task, it will still not print anything in the console.
I just tried this again on a different computer with Google Chrome in Windows 10. Attached gif.
Thank you for the gif, RobotX. This looks very strange and I can’t reproduce it.
Could you please login again from an incognito mode on chrome? Try the task again, if that doesn’t work, please do the following:
- Please open chrome developer tools (F12)
- Open the network tab
- Click “clear” - number one on the picture
- Click Run to run the task
- Click “SubmitTask” in the dev tools to see what happens.
I marked it on the screenshot.
Looks like I’m getting Status Code: 500 Internal Server Error.
The weird thing is that the task above it works just fine.
We found the issue, working on it. Thank you for pointing this out!
The problem is fixed! Please try again now.
Thank you. It works now.
I can continue testing my code now
Greatly appreciate the prompt response.
Out of curiosity, may I know what is the cause of the problem?
I’m very grateful that you wrote about this issue on the forum, as we were unaware of it, and it was affecting ALL our users. So you basically saved the frustrating hours of hundreds of people!
The issue was related to the migration of our database. We were expanding on a bigger server, and the migration utility made only a partial transfer, even though it looked like a complete one. Because of this, our backend couldn’t create new entries in the table that is responsible for statistics tracking, and when you tried a new task - we were getting 500 response. Old tasks were not affected, as it didn’t require creating a new entry in the database in that particular table
Hope you enjoyed the story
Really nice to know the insight of the failure
I’m really enjoying the site so far and glad I’m able to contribute back a bit.
It really helped me a lot to overcome the fear of C# programming.
Now back to my task so my code don’t just partially check the password validation and failed the task
This is great that you enjoy Codeasy, and that it helped you to get rid of the C# fear. This was our intention all along. Good luck with your studies!
P.S. You can suggest us to your friends so that they also overcome the fear of C#
Will certainly do!