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

 

gaurav1780@gmail.com 01_variables_and_operators > overall_speed
prev  |  next  |  chance

Define a function that when passed three integers, first representing the distance between two points (say, A and B), the second representing the average speed from A to B, and the third representing the average speed back from B to A, returns the overall average speed. REALLY understanding the fundamentals of variables and data types will be critical for this question.


overall_speed(2, 5, 3) → 3.75
overall_speed(10, 4, 6) → 4.8
overall_speed(1000, 8, 25) → 12.121212121212121

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

def overall_speed(distance, speed1, speed2):

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

Python Help

Difficulty: 1 Post-solution available

Copyright Nick Parlante 2017 - privacy