From d2010407b9deeca1a96a7fad2b9ca87a4fc63800 Mon Sep 17 00:00:00 2001 From: Rohit Barua <83600150+Rohit-beep-droid@users.noreply.github.com> Date: Tue, 4 May 2021 14:23:41 -0400 Subject: [PATCH] Update 100+ Python challenging programming exercises.txt Provided another solution to 2.14 --- ...ython challenging programming exercises.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/100+ Python challenging programming exercises.txt b/100+ Python challenging programming exercises.txt index 97af5aaf..d9d12e6b 100644 --- a/100+ Python challenging programming exercises.txt +++ b/100+ Python challenging programming exercises.txt @@ -1121,6 +1121,24 @@ if s=="yes" or s=="YES" or s=="Yes": else: print "No" +#----------------------------------------# + +2.14 + +Question: +Write a program which accepts a string as input to print "Yes" if the string is "yes" or "YES" or "Yes", otherwise print "No". + +Hints: + +Use if statement to judge condition. + +Solution +s = raw_input() +lower_case = s.lower() +if lower_case == 'yes': + print "Yes" +else: + print "No" #----------------------------------------#