Challenge: Fixing the Speed Function
Aufgabe
Swipe to start coding
Previously, we created a calcSpeed function for calculating the average speed of a car.
Now you need to fix the function so that it can accept values from outside of the function.
- Remove the local variables
distanceandtimeTakeninside the function. - Add two parameters named
distanceandtimeTakeninside the parentheses of thecalcSpeedfunction. - Finally, call the
calcSpeedfunction twice with the corresponding arguments:1000meters,120seconds.1200meters,160seconds.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 50
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 1.33
Challenge: Fixing the Speed Function
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
Previously, we created a calcSpeed function for calculating the average speed of a car.
Now you need to fix the function so that it can accept values from outside of the function.
- Remove the local variables
distanceandtimeTakeninside the function. - Add two parameters named
distanceandtimeTakeninside the parentheses of thecalcSpeedfunction. - Finally, call the
calcSpeedfunction twice with the corresponding arguments:1000meters,120seconds.1200meters,160seconds.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 50
single