Updates from the Repl.it team about the product

← Back to all posts
Weekly Challenge #5
h
TheDrone7 (1034)

Hello again fellow replers! We just finished our first series of weekly challenges and at the end of a month, @CodingCactus who was ranked 1st received 1 month of free hacker plan.

Today, we'll be starting another series of the weekly challenges and again, at the end of the month, whoever has the highest score, gets 1 month of free hacker plan!

That's it for the old stuff, moving forward, this week's challenge is given below!


Equality Check

Write a program that takes 2 numbers as input and checks if they are equal. BUT, here's a twist, you cannot use any comparision or arithmetic operators in your entire code.

REQUIREMENTS

  1. Comparision operators include ==, >, < and any other similar operators your preferred language may support.
  2. Arithmetic operators include +, -, *, /, % and any other operators that perform the same function as any of the mentioned operators.
  3. There should be a prompt asking for user input.
  4. The output should be meaningfully understandable. ( Don't just print out true or false, use statements such as The numbers you entered are equal instead )

SUBMISSION

For submitting your codes for this challenge, you need to create a new post on repl talk share board and ensure that the post title contains #WEEKLY in it. The judging will go on throughout the week and as soon as the next post is made, the time window for submitting your code will end.


You can check out the last month's results here.

And that's it! Good luck with this week's weekly challenge and have fun!

Commentshotnewtop
DynamicSquid (2611)

Negatives and decimals included?

TheDrone7 (1034)

Negatives, yes. Decimals, your choice. @DynamicSquid

DynamicSquid (2611)

@TheDrone7 Okay, and ! is still fine to use right?

DynamicSquid (2611)

My motivation:

REGAINED

Jakman (368)

Challenge accepted.

7outofBLIP (4)

@adityaru no? What? Then you could just do

double num1;
double num2;
if(num1 != num2){
}

And plus != is still a comparison operator

awesome10 (212)

@TheDrone7 wait so we're allowed to use = to define a variable right?

awesome10 (212)

also can i use - as a string?

7outofBLIP (4)

Does the 'in' keyword in python count as a comparasion operator?

oignons (250)

can i use compare()?

DannyIsCoding (519)

If I thought of two possible ways, can I submit both (in the same repl) ?

TheDrone7 (1034)

I recommend making it only one way for submission because it is possible that one way works perfectly while the other doesn't and you get scored for the one that doesn't and you get disqualified for not meeting the requirements. @DannyIsCoding

DannyIsCoding (519)

@TheDrone7 Ok. Thanks! And can I use bitwise operators ?

DannyIsCoding (519)

Nvm. I just saw someone asked the same question.

sugarfi (484)

can we use bitwise operators?

StudentFires (340)

When the first thing that comes to mind is just (a - b)...
So, Node and Deno lack native user input capabilities, will I have to make my own for this competition?

StudentFires (340)

@sugarfi I finished it yesterday. Also, Deno doesn't have that.

AmazingMech2418 (691)

@sugarfi Also, Node on Repl.it supports the prompt function for synchronous input.

StudentFires (340)

@AmazingMech2418 Phff who uses Node, I didn't even say I was doing JavaScript.

AmazingMech2418 (691)

@StudentFires I use Node... I am planning on learning more about Deno once it is actually stable.

RohilPatel (802)

can you tell me if this is possible to do in javascript?

oignons (250)

For C++, can I use strcmp? @TheDrone7

oignons (250)

@DynamicSquid Ok, will have to think of another way...

CodeLongAndPros (952)

Thank UNIX* for Type Casting.

*Like heaven, but better (My opinion only)

CodeLongAndPros (952)

@DynamicSquid Have you tried to program on MS-Windows?
EMACS is a better OS.

DynamicSquid (2611)

@CodeLongAndPros I use Microsoft Visual Studio on Windows

CodeLongAndPros (952)

@DynamicSquid

Microsoft Visual Studio on Windows

Don't get me started.

You have to install an IDE to get a C(++) compiler? It's standard on all UNIX/Linux/BSD.

DynamicSquid (2611)

@CodeLongAndPros yeah... I hear so many people talking about the standard linux compilers and all that, and tbh, I'm kinda jealous

CodeLongAndPros (952)

@DynamicSquid You can dual boot Manjaro with Windows and not lose any data.

DynamicSquid (2611)

@CodeLongAndPros I guess, but my laptop is basically just chrome and VS, nothing else lol. And I kinda want to keep it that simple. Maybe if I had a desktop I'd probably do that...

CodeLongAndPros (952)

@DynamicSquid It's just an option at boot time:

DynamicSquid (2611)

@CodeLongAndPros k you're just flexing right now lol

CodeLongAndPros (952)

@DynamicSquid Well, given that Linux has 2% desktop share, I do what I can. I hate even just googling on windows now.

CodeLongAndPros (952)

@DynamicSquid Speaking of operating systems, I have Borland C on my Windows 98 Computer. It's sad.

firefish (305)

@CodeLongAndPros That GRUB theme looks nice (I prefer normal GRUB for some reason) but I don't want it mainly because it comes with the garbage that is GNOME window manager

CodeLongAndPros (952)

@johnstev111 That is just a collection. Think GitHub. It is because GRUB and GNOME are maintained by the same people, GNU.

RohanRajagopal (1)

what about +=,-=,*=,/=, etc..? and what about things like isinstance?

TheDrone7 (1034)

@RohanRajagopal those fall under arithmetic operators too, they're just shorthands. Isinstance is fine, that's allowed.

DavidCooperChey (1)

Can you clarify the constraints on the numeric input? Will the numbers all be integer or rational numbers? Are they all formatted in decimal?

TheDrone7 (1034)

@DavidCooperChey I will be testing only regular integers (both negative and positive) but you can add further support for other stuff if you want to.

CodeLongAndPros (952)

Does Python's is keyword count?

a5rocks (787)

Is xor an arithmetic operator?

TheDrone7 (1034)

Nah, the arithmetic operations are the ones listed and other keywords that perform same functions. @a5rocks

RohanRajagopal (1)

"Conditional operators" also includes methods like .equals()/.__eq__()/whatever, correct?

TheDrone7 (1034)

@RohanRajagopal Comparision operators and yes.

CodingCactus (2750)

Hrmmmmm...... Interesting

JDOG787 (185)

cool im excited to have more!!!!!