Problem
Chef and some of his friends are planning to participate in a puzzle hunt event.
The rules of the puzzle hunt state:
"This hunt is intended for teams of 6 to 8 people"
Chef's team has N people in total. Are they eligible to participate?
input format
The first and only line of input will contain a single integer N the number of people present in chef's team.
Output format
print the anwser : yes if chef's team is eligible to participate ,and no otherwise.
Each letter in the output may be printed in either uppercase or lowercase,i.e the outputs No,no,no no will all be treated as equivalent
CONSTRAINTS
.1≤N≤10
SAMPLE 1:
INPUT OUTPUT
4 No
Explanation:
The puzzle hunt requires between 6 and 8 peogle in a team.
4 isn`t between 6and 8,so chefs team cannot participate.
Sample 2:
INPUT OUTPUT
7 Yes
Explanation:
Chef's team has 7 people ,and 7lies between 6 and 8.
so,chef,s team can participate in the events.
Sample 3:
INPUT OUTPUT
8 Yes
Explanation:
chef's team has 8 people ,and 8 lies between 6 and 8.
so chef,s team can participate in the events.
SOLUTION in
python
def main():
n = int(input())
if is_eligible(n):
print("Yes")
else:
print("No")
0 Comments