Learn to Code via Tutorials on Repl.it

← Back to all posts
Learn the Basics of Ruby! Interactive Program for Anyone New to Ruby :)
21Miya (52)

If you're interested in learning the Ruby programming language, this program might help you out with the basics:

printing/putting, delaying code (sleep), variables, some math/methods (to int and to string), arrays, calling random integers, getting user input, loops, and if/elsif/else statements.

Other features:

  • Interactivity! The program asks the user for code after teaching topics to check if the user understands.
  • Tips & help! During any question, the user can input "help" or "h" instead of code in order to receive tips with the specific coding problem.
  • The program itself...is coded in Ruby! So if the user wants to see some Ruby in action, they can check out the IDE. Plus, I recently added comments within the IDE that are meant for the user to read. I highly suggest checking this out.
  • Not too much at once! Seeing a ton of code all at once (or even normal text) can be overwhelming, but this program goes at the user's own pace! Simply press the enter key when ready to move on.

So if you're looking for a new language--this is a sign to try out Ruby (my own preferred language)! Scroll down to the Repl and click run to start learning! :D

Let me know if there's a topic in Ruby that you consider a "basic" that I should cover but didn't in this tutorial! And please leave an upvote if you used it at all or just like it!

If you're using Repl.it with light mode (default), the comments in the IDE will be a pale grey. If you're using Repl.it with dark mode, the comments in the IDE will be green. I explain a lot of things in the comments and it's also a great way to see Ruby color-coded and such.

Michaelmikey (2)

What a great Idea I just started learning Ruby and this is well thought out and executed. Thank you.

Laetitia020304 (2)

that was very interesting! Thank you so much!

shrutiNx (1)

i'm confused please help me.

Zavexeon (722)

@MaxZagar Hey there, please be kind.

MaxZagar (2)

I code super computers all day so this is like learning the alphabet again

21Miya (52)

@MaxZagar Hi! If you are already proficient in this particular coding language then I do not suggest clicking a tutorial described as "basics" since it is clearly not for you. This is simple English--since you do not know what basic means, I will inform you that it means the foundations-only. Thank you for looking at my project! <3

theangryepicbanana (1216)

You could probably use Regex for testing the answer input and a case statement instead of a bunch of elsif statements. Otherwise pretty good

21Miya (52)

@theangryepicbanana Thank you for the feedback! I might not incorporate a case statement in this specific tutorial, but I'll definitely look into it for future projects.

theangryepicbanana (1216)

@21Miya That would be nice too, but I was talking about your actual code

21Miya (52)

@theangryepicbanana I know you were talking about my code. What else would you be talking about? :o

StrayLove (2)

this is coolio. and so fun too.