0
Python "Brain Freeze"
- Simple Operations, 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. ---- I've tried what I thought was accurate, clearly not lmao. Keeps saying I'm close but not sure where I'm going wrong. I've tried as a 1 line print statement and with variables My code: kids = 23 + 27 + 18 print(kids / 2) Also tried, print(23+ 27 + 18 / 2) Help? Lol
14 odpowiedzi
+ 3
Could you post the full question of Brain Freeze?
+ 2
Thank you!
+ 1
Firstly You will have to close the addition bracket before division
if (23+27+18)%2 == 0:
print("The Scoop of ice cream is enough for the 3 group")
else:
reslt = (23+27+18)%2
print("You need to get", reslt, "scoop of ce cream more")
0
Aysha I think the code below the question is their attempt.
0
Edited my original question
0
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.
0
Please help, I tried what was accurate clearly I can’t find the answer.
0
To put it in better explanation you need to add 2 more sets of parentheses with first adding them around the addition section and then separating the multiplication to the right of the parentheses so double parentheses all the way to the left and then the separation of multiplying with with one and then another one just to the right of the multiplication part. Sorry for my explanation I'm kinda in a rush.
0
##icecream
A = 23 * 2
B = 27 * 2
C = 18 * 2
Print(A + B + C)
0
# brain freeze
print ((23+27+18)*2)
0
you have to multiply
you have to write
print (kids * 2)
if this right please like