+ 1
Help Question 2.1
#print( ( 23 + 27 + 18 ) * 2 ) This is my answer can someone assist me and give feedback The question was : Today is a holiday at the children's camp, so all the children will be served ice cream. There are 3 groups of children: 23 children in the first group, 27 in the second, and 18 in the third. Every child should get 2 scoops of ice cream. Write a program to calculate and output the total number of ice cream scoops we need.
3 Answers
+ 1
print( ( 23 + 27 + 18 ) * 2 )
0
thank you i figured it out as well the code didnt work i forgot to remove the hashtag... silly mistake
- 1
Your code looks good.
The only improvement would be if children are in more than one group. In that case you could make an array for each group and find the length of the union of the three (you would also need to populate the arrays with children), but since your question isn't that complicated I think you got the right answer. Good job. :)