• CKSTEM
  • Learn 
    • CKSTEM Courses
    • 2025 Program Registration Event
    • New Year, New Dreams, New Successes!
    • CKSTEM Family Challenges
    • Holiday Fun Activities
    • How to Outsmart AI?
    • Doses of Motivation
    • Talent V/S Core Values
    • Problem Solving Strategies
  • Compete 
    • Canadian Innovation Contests
    • Australian Mathematics Contest 2025
    • TIMO
    • BBB Olympiad
    • HKIMO
  • Win 
    • Contest Winners
    • CIC 2024 Winners
    • CIC 2023 Winners
    • CIC 2022 Winners
  • Team 
    • About Us
    • Executives
  • …  
    • CKSTEM
    • Learn 
      • CKSTEM Courses
      • 2025 Program Registration Event
      • New Year, New Dreams, New Successes!
      • CKSTEM Family Challenges
      • Holiday Fun Activities
      • How to Outsmart AI?
      • Doses of Motivation
      • Talent V/S Core Values
      • Problem Solving Strategies
    • Compete 
      • Canadian Innovation Contests
      • Australian Mathematics Contest 2025
      • TIMO
      • BBB Olympiad
      • HKIMO
    • Win 
      • Contest Winners
      • CIC 2024 Winners
      • CIC 2023 Winners
      • CIC 2022 Winners
    • Team 
      • About Us
      • Executives
broken image
broken image
broken image
  • CKSTEM
  • Learn 
    • CKSTEM Courses
    • 2025 Program Registration Event
    • New Year, New Dreams, New Successes!
    • CKSTEM Family Challenges
    • Holiday Fun Activities
    • How to Outsmart AI?
    • Doses of Motivation
    • Talent V/S Core Values
    • Problem Solving Strategies
  • Compete 
    • Canadian Innovation Contests
    • Australian Mathematics Contest 2025
    • TIMO
    • BBB Olympiad
    • HKIMO
  • Win 
    • Contest Winners
    • CIC 2024 Winners
    • CIC 2023 Winners
    • CIC 2022 Winners
  • Team 
    • About Us
    • Executives
  • …  
    • CKSTEM
    • Learn 
      • CKSTEM Courses
      • 2025 Program Registration Event
      • New Year, New Dreams, New Successes!
      • CKSTEM Family Challenges
      • Holiday Fun Activities
      • How to Outsmart AI?
      • Doses of Motivation
      • Talent V/S Core Values
      • Problem Solving Strategies
    • Compete 
      • Canadian Innovation Contests
      • Australian Mathematics Contest 2025
      • TIMO
      • BBB Olympiad
      • HKIMO
    • Win 
      • Contest Winners
      • CIC 2024 Winners
      • CIC 2023 Winners
      • CIC 2022 Winners
    • Team 
      • About Us
      • Executives
    Canadian Innovation Contests
    • CKSTEM
    • Learn 
      • CKSTEM Courses
      • 2025 Program Registration Event
      • New Year, New Dreams, New Successes!
      • CKSTEM Family Challenges
      • Holiday Fun Activities
      • How to Outsmart AI?
      • Doses of Motivation
      • Talent V/S Core Values
      • Problem Solving Strategies
    • Compete 
      • Canadian Innovation Contests
      • Australian Mathematics Contest 2025
      • TIMO
      • BBB Olympiad
      • HKIMO
    • Win 
      • Contest Winners
      • CIC 2024 Winners
      • CIC 2023 Winners
      • CIC 2022 Winners
    • Team 
      • About Us
      • Executives
    • …  
      • CKSTEM
      • Learn 
        • CKSTEM Courses
        • 2025 Program Registration Event
        • New Year, New Dreams, New Successes!
        • CKSTEM Family Challenges
        • Holiday Fun Activities
        • How to Outsmart AI?
        • Doses of Motivation
        • Talent V/S Core Values
        • Problem Solving Strategies
      • Compete 
        • Canadian Innovation Contests
        • Australian Mathematics Contest 2025
        • TIMO
        • BBB Olympiad
        • HKIMO
      • Win 
        • Contest Winners
        • CIC 2024 Winners
        • CIC 2023 Winners
        • CIC 2022 Winners
      • Team 
        • About Us
        • Executives
    broken image
    broken image
    broken image
    • CKSTEM
    • Learn 
      • CKSTEM Courses
      • 2025 Program Registration Event
      • New Year, New Dreams, New Successes!
      • CKSTEM Family Challenges
      • Holiday Fun Activities
      • How to Outsmart AI?
      • Doses of Motivation
      • Talent V/S Core Values
      • Problem Solving Strategies
    • Compete 
      • Canadian Innovation Contests
      • Australian Mathematics Contest 2025
      • TIMO
      • BBB Olympiad
      • HKIMO
    • Win 
      • Contest Winners
      • CIC 2024 Winners
      • CIC 2023 Winners
      • CIC 2022 Winners
    • Team 
      • About Us
      • Executives
    • …  
      • CKSTEM
      • Learn 
        • CKSTEM Courses
        • 2025 Program Registration Event
        • New Year, New Dreams, New Successes!
        • CKSTEM Family Challenges
        • Holiday Fun Activities
        • How to Outsmart AI?
        • Doses of Motivation
        • Talent V/S Core Values
        • Problem Solving Strategies
      • Compete 
        • Canadian Innovation Contests
        • Australian Mathematics Contest 2025
        • TIMO
        • BBB Olympiad
        • HKIMO
      • Win 
        • Contest Winners
        • CIC 2024 Winners
        • CIC 2023 Winners
        • CIC 2022 Winners
      • Team 
        • About Us
        • Executives
      Canadian Innovation Contests
      broken image

      Test Your Python Skills

      make a factorial function in 3 lines of code

      · Programming

      I am assuming that you know factorials already. If this is a new term or you forgot what it means, you may find details at amazing wikipedia. Your goal is to edit only 3 lines in the following Python code to make factorial function working for 0 to 10. We don't like large numbers because it throws us "out of memory".

      Well, you may not trust me. Most likely would like to test the program with a large number to do a factorial.

      NO PROBLEM

      You may need to make factorial function work first before you could do its memory test. Good Luck!

      I almost forgot to tell you that this program rotated our logo by 90 degrees. We are not happy about it. If you get bored while writing 3 lines of code, you can click on the logo and use arrow keys on your keyboard to fix it. The team at Competitive Kids STEM will appreciate your help to fix logo alignment. There is a "Check" button next to the "Run" button for you to validate if your code can handle factorials.

      Finally, a famous guy wrote a long email and said I am sorry, I didn't have time to write a shorter email, hence I am writing a longer one. Well, writing efficient code is hard. Never judge a programmer by the number of lines of code s/he writes. On an unrelated topic, what is factorial of zero? Is it one? Factorial of zero is one. That's very strange. One more mystery for you to solve. I have full faith in you to solve all of this mess.

      NOW YOU CAN HAVE FUN.

      BTW, please don't post answers in the comment section. We would like other people to solve it themselves. You can provide hints or ask questions.

      Subscribe
      Previous
      Learning Together
      Next
      Vision 2020 - Jan Updates
       Return to site
      Profile picture
      Cancel
      Cookie Use
      We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
      Accept all
      Settings
      Decline All
      Cookie Settings
      Necessary Cookies
      These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
      Analytics Cookies
      These cookies help us better understand how visitors interact with our website and help us discover errors.
      Preferences Cookies
      These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
      Save