From the course: Introduction to Dart
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Challenge: Volume of sphere - Dart Tutorial
From the course: Introduction to Dart
Challenge: Volume of sphere
(upbeat music) - [Instructor] In this challenge, you will write and run a Dart code that calculates the volume of a sphere using Dartpad. Here are the steps you would need to complete. First of all, go to darpad.dartlang.org. Next, create a function and call it calculateSphereVolume. Number three, the function must receive one parameter, which is the radius. And next, use the volume of a sphere formula to solve the problem. Finally, press the Run button to execute your code and see the output. Remember to call your function in the Main function. Once you've completed this challenge, you can test your code by changing the radius to another value and seeing how the output changes accordingly. This challenge should take no more than 15 minutes to complete. Good luck and happy coding.