4 תשובות
פוקנציה זה-
def function():
....
def check():
text = "did you did your home work?"
text1 = text.uper()
if("yes" in text1){
print("yes")
} else {
print("no")
}
if("yes" in text){
print("yes")
} else {
print("no")
}
אוי פאק, טעיתי לא קראתי את השאלה
def check(text):
textupper = text.upper()
textlower = text.lowwer()
if("yes" in textupper || "yes" in textlowwer){
return true;
} else {
return false
}

ואז בפונקציית main-
check("did you do your homework?")
זה יחזיר לך false