Function Arguments | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

Function Arguments

Fill in the blanks to define a function that prints "Yes", if its parameter is an even number, and "No" otherwise. ____ even(x): if x%2 == 0: ____ ("Yes") ________ print("No")

28th Dec 2020, 8:04 AM
Sri Laya
Sri Laya - avatar
8 Answers
+ 5
Attunuru Baby Sri Laya else print("No")
28th Dec 2020, 8:25 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
Attunuru Baby Sri Laya I think you missed a colon else: print("No")
28th Dec 2020, 8:39 AM
Krish
Krish - avatar
+ 2
There i guess it would be else Read the question well you will get your answer " If it is even print yes **else** print no"
28th Dec 2020, 8:27 AM
Krish
Krish - avatar
+ 2
Attunuru Baby Sri Laya If you are talking about Quizzes in the lessons ,You can get the answers from the comments below in each quiz if u couldn't make it , Check that out !!!
28th Dec 2020, 8:39 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 1
Attunuru Baby Sri Laya, show your attempt please, we are not doing homework in the Q&A fourm.
28th Dec 2020, 8:09 AM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar
+ 1
@Dino Wun def even(x): if x%2==0: print ("Yes") _______ print("No") ##Actually i tried a lot to fill that place but i couldn't get it!! If possible could u pls help me in solving it...!!!
28th Dec 2020, 8:23 AM
Sri Laya
Sri Laya - avatar
+ 1
@Krish @Alphin K Sajan Yeah i tried it in first attempt only.....but it's incorrect.
28th Dec 2020, 8:37 AM
Sri Laya
Sri Laya - avatar
+ 1
@Krish Yup.....Thanks
28th Dec 2020, 8:43 AM
Sri Laya
Sri Laya - avatar