Contact Us

Five Python Coding Challenges For You and Your Students

Oct 11, 2016 3:44:57 PM

Teaching Computer Science can be difficult, especially if it’s not your first subject and you have little, if any programming experience.
This also makes the task of conceiving ideas to allow your students to develop their skills difficult. In an effort to help you, I have collated five “coding challenges” that you can offer to your students. They are suitable for those learning to program for the first time.

Did you know? These challenges are available right now on Codio. With a Codio subscription (or free trial), you can take advantage of our classroom management features and share these challenges with your students quickly and easily. As a teacher you will also get to see a solution to each challenge and recommendations for extension tasks.

 

Challenge 1 - Magic Number (easy)
Allow a user to enter any number, then double this number, add 9 to the result, subtract 3 from the result, then divide by 2, finally subtract the number the user entered at the beginning. The answer should always be 3.


Challenge 2 - Biggest Number (easy)
Write a program that will allow a user to enter two integers. The program should then output a message stating whether the first number is the biggest or the second number is the biggest.


Challenge 3 - Star Sign (fairly challenging)
Write a program that accepts day and month integers as input. It should then output a corresponding star sign. Students will probably need to consult a star sign table on the World Wide Web.

 

Challenge 4 - Leap Year (challenging)
Write a program that allows a user to enter an integer (the year). It should then output a message stating whether it’s a leap year or not. The following instructions can be passed on to your students to help them create a solution.

  • If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5
  • If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4
  • If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5
  • The year is a leap year
  • The year is not a leap year

** Source: ** https://support.microsoft.com/en-us/kb/214019 


Challenge 5 - Times Tables (challenging)
Write a program to output the “times table” for the number 12. The output should be 10 rows:

    1 x 12 is 12
    2 x 12 is 24
    (3-9 x 12)
    10 x 12 is 120

Did you know? These challenges are available right now on Codio. These challenges mark the start of a new series of resources being added to the Codio platform. We want to help computer science teachers in any way we can and we see this as a great way to offer our support. Any feedback is much appreciated so drop us an email if you get the chance.

Join Codio Today

21.png

Thomas Smith

Written by Thomas Smith

Tom is Head of Schools Liaison at Codio having been a computer science teacher for nine years. He enjoys web development and teaching others how to code.