Dream to Learn is shutting down...

We are very sorry to say that Dream to Learn will be shutting down as of December 28th, 2019. If you have content that you wish to keep, you should make a copy of it before that date.


Brute Force Math - with Python!

POSTED IN: Getting Kids Excited about STEM, Computer Science and Electrical Engineering

Teaching kids about "brute force' methods to solve problems or gain access


Math Problem

  • 10 digit number 3,872,649,A0B

  • is divisible by 36

  •  The letters A and B each represent single digit EVEN numbers  (0,2,4,6,8)

  •  GOAL: Find sum of A and B

# L&J - this is a sample program of how to leverage computing power
# to "brute force" a problem.  In this case - we are going to use a
# Loop to try EVERY possible combination answer to your question
# while at time inelegant - it can be effective for solving problems
# black hat hackers also use this to try to crack passwords








PS - the answer is SIX


Interested in more content by this author?

About the Author

Ryan Anderson

Ryan Anderson

Hi! I like to play with data, analytics and hack around with robots and gadgets in my garage. Lately I've been learning about machine learning.

About this blog

Created: March 16, 2017


Up Next