hi guys
I really thought about This question, but I couldn't answer that
Could you please tell me what is the solution or how i can solve it?
in Intro to App Development Curriculum lesson 14
Exercise: Counting Votes
You're implementing a poll app for your class. You start with a basic yes-no question counter and now you have your first batch of answers back, parsed into arrays below.
This is a lot of data! But don't worry too much about the long arrays. Whether you're planning to loop over two items or two thousand, you’ll write the loop in exactly the same way.
let shouldMascotChangeVotes: [Bool] = [false, false, false, true, false, true, true]
let shouldInstallCoffeeVendingMachineVotes: [Bool] = [true, true, false, false]
let shouldHaveMorePollOptionsVotes: [Bool] = [false, false, true, true, false, true, false, false, false, false]
This is too many votes to tally quickly by hand, so you’ll write some code to tally it for you.
NOTE
This is also a lot of votes for Swift to use type inference to determine what kind of array it has. The type annotation is written in the array literals above to tell Swift the type of array. This prevents the playground from running slowly.