Updates from the Repl.it team about the product

← Back to all posts
Weekly challenge #4
h
TheDrone7

Hello again fellow replers! Last week, we announced the third weekly challenge and you can check it out by clicking here.

The results can wait but the next challenge most probably cannot, so here we go!


Number of letters in numbers!

So, for this week's challenge, you are going to have to do the following:

  1. Take a numerical input from the user ( natural numbers only ( > 0 ) )

  2. Convert it intro words (string). For example:
    234 => two hundred and thirty-four

  3. Count the number of alphabets in the string (only alphabets, ignore all spaces and hyphens). For example:

    two hundred and thirty-four => 23

  4. Print the result (in readable/understandable format). A sample desired run is shown below.

NOTE : You can change the prompt and outputted messages but there should be some understandable prompts/messages.

ALSO, sticking to the theme of keeping these beginner friendly, no external libraries allowed. Do it the old (lots of if statements) way!

Moreover, the numbers that will be entered while testing will always be less than 1 million.

AGAIN, for submitting, post your repl on the repl talk share board and be sure to have #WEEKLY in your post's title.

And that's it for this week! Have fun!


WEEKLY 3 RESULTS

For the third weekly challenges, we received very few submissions, after scoring which, the following is the leaderboard!

RANK 1 : @CodingCactus with a score of 23 points!

RANK 2 : @Lord_Poseidon with a score of 22 points!

RANK 3 : @Scoder12 with a score of 17 points!


THE END

This is the last of the weekly challenges. At the end of this weekly challenge, whoever has the highest overall score, wins the 1 month of free hacker plan! Good luck to everyone! And remember, even if you cannot win the hacker plan, you can still solve this to increase your coding knowledge and/or just for fun!

Voters
TheDrone7
Comments
hotnewtop
AksLolCoding

I have to code this now. @TheDrone7 Does length matter?

TheDrone7

@AksLolCoding this is last year's lmao. The new one must've been posted by dynamic squid.

mwilki7

heck I read the directions wrong and thought we were supposed to convert it both ways and already implemented it >:v

JackFly26

How high up do we need to go for numbers? like do we need to know what a duodecillion is or what?

TheDrone7
JackFly26

@TheDrone7 thx im blind

frissyn

Welp, guess I'm doing this now. Never done a weekly before, just doing for fun, I guess.

ChezCoder

what if the number were negative?

TheDrone7

They will never be negative, natural numbers are all non zero positive integers only. @ChezCoder

ChezCoder
ChezCoder

lol i didnt participate in the last one because my brain is to slow for it, it might explode if I did it

DynamicSquid

@ChezCoder yeah same lol... I don't know if I want to do this one or not, I just don't fell like it

ChezCoder

@DynamicSquid lol, the last one was just plain boring because it was similar to week2 so i didnt do it. This one's actually unique in a way

DynamicSquid

@ChezCoder true, and I should probably do these since it helps my coding skills, but like... I'm doing other coding things now lol

ChezCoder

@DynamicSquid lol. Im doing this challenge but imma spread the workflow out instead of trying to do it in a day. Knocks all the sense out of me

DynamicSquid

@ChezCoder oh I can't do that, for small projects like these, it's either in one sitting, or I lose motivation, and I don't wanna do it in one sitting lol

ChezCoder

@DynamicSquid lol that happens to me all the time. Half of my repls are unfinished because "oh gtg, sleep". And the next day, it just sorta loses meaning XDD

DynamicSquid

@ChezCoder lol, that happens to me soo much. I really need to work on my motivation

CodingCactus

awww I have to go and google what a natural number is lol

CodeLongAndPros

@CodingCactus A positive nonzero number.

CodingCactus

@CodeLongAndPros You replied 3 hours after i commented, I can google things in less than 3 hours lol

sugarfi

Is two hundred thirty four an acceptable string for the number 234?

TheDrone7

That's acceptable as long as you print you're going that way. @sugarfi

sugarfi

@TheDrone7 wdym? should I just print out no "and" will be displayed or something similar?

TheDrone7

@sugarfi just print out the string you'll be using for counting the alphabets.

Coder100

First