id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

frew@mclean.com > freefall
prev  |  next  |  chance

Calculate physics freefall whole seconds in air. For example, You throw a ball upward from a balcony. After 20 m of vertical displacement (relative to the throw point), how long has it been falling? The formula is time = square root(2 * |height| / 9.8). The ball can be thrown up or down.


freefall(20) → 2
freefall(-20) → 2
freefall(10.5) → 1

...Save, Compile, Run (ctrl-enter)

public int freefall(double height) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy