New: Practice Python, JavaScript & SQL with AI feedback — Try ActiveSkill free →

Day 13, Bug Fixing Exercise 1

Explanation

Line 1 was

def calculate_time(g=9.80665, h):

but it should be

def calculate_time(h, g=9.80665):

Non-default parameters such as "h" should come first in a function definition, then the default parameters. 


Recommended Course

Python Mega Course: Learn Python in 60 Days, Build 20 Apps
Learn Python on Udemy completely in 60 days or less by building 20 real-world applications from web development to data science.