0
Python core exercise (task ) or bug -Club access man older 18 y.o.
I found bug in Python core. And cannot resolve it. I cannot find mistake. age = int(input()) name = input() if age >= 18: print("welcome : ", name) else: Ā print("sorry") The application says that it matches three answers good, but it still doesnāt fit completely for 4 and 5 example .Ā I don't understand where the error is. Is there at least one person here who can tell me where the error is, why I canāt go further, although I think that the answer is correct. You can Find it Python Core course -> control structures-> Statement ELSE -> practice
4 Answers
+ 5
ŠŠ½Š“ŃŠµŠ¹ Š ŃŠ±Š°ŠŗŠ¾Š² ,
Check the print statement...put exactly what they given within print statement...eg:- first letter caps or space like that...
May be that too results in test case fail....
+ 5
It appears the program output does not match exactly what Code Coach is looking for.
Here is the task description from Python Core > else statement:
else Statement
Write a program to control entrance to a club.
Only people who are 18 or older are allowed to
enter the club.
The given program takes the age and the name
of the person who tries to enter. Complete the
program to output "Welcome" followed by the
name of the person if they are allowed to enter
the club, and "Sorry" if they are younger than the
allowed age.
Sample Input
24
James
Sample Output
Welcome James
Do not forget to put a space between
"Welcome" and the name.
+ 3
MatÄj JonĆ”Å” ,
you may not find this exercise because if is part of the python tutotial `python core`.
this tutorial is currently not available.
0
where exactly can i find the excercise?