Thanks to visit codestin.com
Credit goes to github.com

Skip to content
View kumi8129's full-sized avatar

Block or report kumi8129

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
kumi8129/README.md

Build a Guessing Game in the CLI

Skills: user input, methods, cli, looping, gets

Instructions

Running Your Guessing Game

Packaged with this repository is a runner file bin/guessing_cli.

The "bin" directory is short for "binary", which is another way of referrering to an executable file.

The executable "bin/guessing_cli" is a Ruby file, but the ".rb" extension has been left off. The ".rb" extension is not mandatory for Ruby files, it is just a nice thing to have for the purposes of identifying the type of the file. However, it is a convention to leave the file extension off of executable files, which comes from true binary files that contain pure machine code (1's and 0's) rather than human readable source code like Ruby.

Assuming you are in the root directory of the guessing_cli project, run your guessing_cli from the command line with ruby bin/guessing_cli.

Alternatively, you can also just say bin/guessing_cli since a line of code has been added to the top of the bin/guessing_cli runner file that tells your command line shell which program to run the file with.

Building the run_guessing_game method

So your run_guessing_game method is going to be responsible for several things: - Taking in input from the command line - Comparing that input to a random number that has been generated - Printing out a statement You guessed the correct number! if the number has been guessed correctly, or The computer guessed <number>. if the number has been guessed incorrectly - Allowing the user to exit the program when exit is the input

Things to Keep in Mind

This is a challenging lab, so go through it slowly. Look at the RSpec test and see what the tests are looking for. Talk to each other and communicate your way through roadblocks.

Also, run learn in order to run your tests!

Hints...

The Curious Tale of Shrek

There was once an ogre who had no friends,
He lived out in the swamp for the longest __while__,
Living out his days in quiet contemplation,
He really didn't tolerate the presence of __rand__oms,
Until an annoying donkey once came along,
And started to __break__ his brain with madness.

Resources

View Build a Guessing Game in the CLI on Learn.co and start learning to code for free.

Pinned Loading

  1. Bioconductor Bioconductor Public

    Stickers for some Bioconductor packages - feel free to contribute and/or modify.

    JavaScript

  2. detection detection Public

    Official PyTorch implementation of "Joint Object Detection and Multi-Object Tracking with Graph Neural Networks"

    Python

  3. kumi8129 kumi8129 Public

    Ruby

  4. semantically semantically Public

    Code and Data for ACL 2019 "Semantically Conditioned Dialog Response Generation via Hierarchical Disentangled Self-Attention"