Challenge: Even Number Collector
Завдання
Swipe to start coding
Calculate the total expenses from a list of daily expenses using a for loop.
- Create a variable named
totaland set it to0.0— this will store the running sum of expenses. - Use a for loop to go through each element in the
expensesarray. - In each iteration, add the current expense to
total. - After the loop finishes, return the
totalvalue.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 9.09
Challenge: Even Number Collector
Свайпніть щоб показати меню
Завдання
Swipe to start coding
Calculate the total expenses from a list of daily expenses using a for loop.
- Create a variable named
totaland set it to0.0— this will store the running sum of expenses. - Use a for loop to go through each element in the
expensesarray. - In each iteration, add the current expense to
total. - After the loop finishes, return the
totalvalue.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single