Menú

Just Improved a Bit - Plus a Challenge for Everyone

count =0
count2 = 0
result = ""
result2 = ""
age = 0
name = ""

 

for num in range(0,5):
name = input("Enter Your Name")
age = int(input("Enter Your Age"))
if age >=18:
result = result + name + "\n"
count = count +1
else:
result2 = result2 + name + " - X\n"
count2 = count2 +1

 

print(count,"has made it into the program\n",result,"\n",count2,"has NOT made into the program\n",result2)

 

Comments: Please comment to this post!

 

Challenge: Please find a reason why there is a space before the followings -

- first name in results,

- second list

- first name of the second list