Challenge: Fixing the Speed Function
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 50
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 1.33
Challenge: Fixing the Speed Function
Scorri per mostrare il menu
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 50
single