Click here to Skip to main content
15,904,494 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
You are filling your name in a google form and there is a limit on the number of letters in your name. Suppose the limit is X , enter your name in a string type variable Y and check whether your name is valid or not.

Input Format

The first line of input contains the limit of letters in the name, stored in X. The second line contains your name stored in Y

Constraints

0<=X<20

Output Format

The output should be in the format of yes or no output format is case sensitive

Sample Input 0

5
Nazim
Sample Output 0

yes


What I have tried:

Python
X = int(input())
Y = input()

if len(Y) <= X:
    print("yes")
else:
    print("no")
Posted
Updated 9-Mar-23 21:23pm
v2
Comments
OriginalGriff 10-Mar-23 1:57am    
And?
What does it do that you didn't expect, or not do that you did?
What have you tried to do to find out why?
Are there any error messages, and if so, where and when? What did you do to make them happen?

This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
CPallini 10-Mar-23 3:30am    
The posted code looks correct. What is your doubt about?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900