Write a Program to Print Yes if the string is Yes or Print No


Write a program that accepts a string as the input to print “Yes” if the string is “yes” or “YES” or “Yes”, otherwise print “No”.


  • Use the if statement to judge the condition.


s= raw_input() if s=="yes" or s=="YES" or s=="Yes": print "Yes" else: print "No"
Code language: Python (python)

Leave a Comment