Giter Site home page Giter Site logo

float-chapter's Introduction

Ruby Practice

Run your Ruby file by typing ruby and then the name of the file you want to run in the Terminal.

If we want to run float_round.rb, we can write the command:

ruby float_round.rb

To re-run this command, you can use the UP and DOWN arrow keys to look at the history of commands you've run in a Terminal.

Float

float_find_hypotenuse.rb

A right triangle's two shorter sides have length 2.8 and 4.5. Write a program to calculate how long its longest side is and print it.

Remember: the Pythagorean Theorem says that

pythagorean therum

where a and b are the lengths of the shorter sides, and c is the length of the longest side.

Your program should output a number; for example,

5.3

Read more about the formula: https://www.mathsisfun.com/pythagoras.html

float_rounding.rb

Write a program that calculates 10 divided by 3 and rounds the result to 3 decimal places. The program should print this result.

3.333

Specs

Click here to see names of each test

float_find_hypotenuse.rb should output '5.3''

float_round.rb should output '3.333'

float-chapter's People

Contributors

bpurinton avatar jelaniwoods avatar osha7 avatar pmckernin avatar

Watchers

 avatar  avatar  avatar

Forkers

jmw686-appdev shreyadon-appdev ktmishra1-appdev anniechung93-appdev arun-gokhale-appdev fgressierbooth-appdev maudtimmermans-appdev academicsbooth cristalbooth cole-appdev emarkman312-appdev juliajain19 lyuhas0-appdev kbourgon-appdev tszwailoong-appdev anindobanerjee-appdev blee41-appdev geissler25-appdev cales413-appdev jgu4appdev msalier-appdev ewinters92-appdev lmindyuk2-appdev dailtdoc reinstallinghope jbhusals-appdev arvindang-appdev madisonzeller-appdev jmurati-appdev sandborn-chicago-booth rmappdev2020 20appdev chicagoboothcourse crhoover12-appdev bwatson0-appdev josh-staske-booth-app-development senseenone ryanwade-appdev wojciechsokolowski-appdev llavan1-appdev ishandil jimena-appdev mylesbulla-appdev gbunch-appdev kcrow372-appdev chicagobooth-application-development mwarner0-appdev bram-appdevo aopecho7 application-development-course ryannelis1988 olgasworld jmoral-appdev-1 appdevcourse boothstuffbus36110 raghubetina-appdev dveldman01-appdev hgbooth-appdev rhetherington26-appdev thisisyiweiatbooth jbrown34-appdev fallappdev2020 kharpe-appdev erikadenedu-appdev romanomar boothyepes0 luisptmdf-appdev hnguyen0-appdev booth-appdevelopment-yisroel jurgenuhlmann-appdev chicagobooth-app-dev tvoutsos19 harryhendharto-appdev mlanno-appdev wermomz app-dev-swh byront20-appdev ngoossen-booth-appdev wilsonreese-appdev boothrm conesy4-appdev ddimitrov777-appdev svenka8-appdev rodrigogop-appdev junhongchoibooth djp-app-dev pedrogu-appdev clairehkim-appdev azolezzi-booth-appdev danieljee-appdev waterpolowarrior-appdev2020 avivellanki courtneyfeller-appdev sach-dev-appdev shreyaspawale-appdev wfswee-appdev kharris0-appdev kitarp-appdev cmadison-appdev manudattan-appdev

float-chapter's Issues

Improve checks for hardcoded solutions

To something like:

if !line[0] =="#" || line[0] == "p" || line[0] == "puts"

instead of include?. This should be more accurate b/c p could appear in a comment (w/ the word # Example for instance) which would prevent the test from ignoring that line.

There is the case when p could be the first letter in a variable, not using the p method, but that should also be safe to ignore since it's not a hard coded solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.