Puzzles

Try to collect the most coins possible! Each correct answer gives you 5 coins! If you win 25 or more coins you are now officially a Master Coding Duck!!

0 Coins

0

1. Is it true that 2+3=5? If yes return the answer!

               if (true){
                    return 5;
               }

What does the function return?

2. Leah's new name is 8, John's new name is 6, and Caleb's new name is 14. Return Leah's new name!

               x = 8
               y = 6
               z = 14
               {
                    return x;
               }

What does the function return?

3. Megha has been given a new name called 3. Is it true that Megha's new name is 4?

               x = 3
               if (x = 4){
                    return True;
               }
               else {
                    return False
               }
          

What does the function return?

4. If John's new name is 2 and Megha's new name is 4, is John's and Megha's new name the same?

               x = 2
               y = 4
               if (x = y){
                    return True;
               }
               else {
                    return False;
               }
          

What does the function return?

5. Caleb has 4 apples and Leah has 5 apples. How many apples do Caleb and Leah have?

               x = 4
               y = 5
               {
                    return x + y;
               }

What does the function return?

Created 2/17/2019
John Cinquegrana, Megha Mansuria, Leah Mitelberg, Caleb Choy
Team Coding Ducks
Stevens Duckhacks 2019