32.9k views
1 vote
What kinds of circumstances would lead you to writing a function versus using a loop? please explain in simple terms

User MikeKlemin
by
4.7k points

1 Answer

4 votes

Answer:

1. You want to use parameters

2. You don't want your program to run multiple times

3. You want to call that snippet of code throughout your program

hope this helped :D

User RichardCook
by
5.3k points