+ 5
Tiago De Macedo ,
this is your code slightly modified to make it run. see also the comments and hints:
#age = int(input()) # has to be inside the loop, otherwise it can take only one input
x = 0
price = 0
while x < 5:
age = int(input())
x = x+1
if age >= 3:
# should be: >= 3
price += 100
else:
continue
#elif age < 3:
#price += 0
#x = x+1 # has to be before the conditionals
print(price)
# has to be outside the loop
+ 2
sum = 0
for i in range(5):
old = int(input())
if (old >= 3):
sum += 100
print(sum)
+ 1
Task required to accept 5 inputs but your program is taking only single first input, and taking that into count as same value in loop 5 times..
edit: take input in loop..