Browse Tag: google foobar

Google FooBar – Level 2 – Gearing up for Destruction – Python

I’ve recently been learning Python and was invited to the Google Foobar challenge. Google Foobar is an invitation only event that appears if Google detects that you’ve been searching for Python or Java related topics. You can accept the even and complete 5 levels which if you complete you will be able to fill out your personal information for a chance at an interview at Google. My skills aren’t the best but I had some trouble figuring out some of the levels so I decided to publish my submissions in hopefully helping someone out.

Objective

To complete the Google Foobar Level 2 challenge, Gearing up for Destruction

Instructions

I found this puzzle very difficult since I did not understand much about gear ratio’s and the formulas associated with them. Your best bet is to read about Gear Trains on the Wikipedia page and follow along some of the formulas there and understand the concept of Gear Ratio’s.
Continue Reading

Google FooBar – Level 2 – Please Pass the Coded Messages – Python

I’ve recently been learning Python and was invited to the Google Foobar challenge. Google Foobar is an invitation only event that appears if Google detects that you’ve been searching for Python or Java related topics. You can accept the even and complete 5 levels which if you complete you will be able to fill out your personal information for a chance at an interview at Google. My skills aren’t the best but I had some trouble figuring out some of the levels so I decided to publish my submissions in hopefully helping someone out.

Objective

To complete the Google Foobar Level 2 challenge, Please Pass the Coded Messages

Instructions

When I first wrote the answer for this puzzle it worked on my computer but Google kept giving an error code around for:

I couldn’t figure out another solution to the puzzle. I ended up going a different route. Both my solutions are below but only the second will work. If anyone knows how to get the first solution to work please let me know. Continue Reading

Google FooBar – Level 2 – Lovely Lucky LAMBs – Python

I’ve recently been learning Python and was invited to the Google Foobar challenge. Google Foobar is an invitation only event that appears if Google detects that you’ve been searching for Python or Java related topics. You can accept the even and complete 5 levels which if you complete you will be able to fill out your personal information for a chance at an interview at Google. My skills aren’t the best but I had some trouble figuring out some of the levels so I decided to publish my submissions in hopefully helping someone out. This level was especially difficult since I didnt quite understand the approach to it and had to figure out the Fibonacci Sequence.

Objective

To complete the Google Foobar Level 2 challenge, Lovely Lucky Lambs

Instructions

This puzzle was a little tricky. I figured out the way to get the first half by doubling the values. The second part of the puzzle requires the knowledge of the Fibonacci Sequence and without knowing the Fibonacci Sequence and numbers you would be lost in this level.  You’ll notice that up on top of my code I return the number 8 as one of the answers if the total lambs is equal to 917503. This is the answer for ‘Test 9’ of the 10 tests that Google runs your code through. My code will not output the correct answer for Test 9 so I had to brute-force the answer. My code should work for this level to pass all 10 tests. Continue Reading

Google FooBar – Level 1 – Braille Translation – Python

I’ve recently been learning Python and was invited to the Google Foobar challenge. Google Foobar is an invitation only event that appears if Google detects that you’ve been searching for Python or Java related topics. You can accept the even and complete 5 levels which if you complete you will be able to fill out your personal information for a chance at an interview at Google. My skills aren’t the best but I had some trouble figuring out some of the levels so I decided to publish my submissions in hopefully helping someone out.

Objective

To complete the Google Foobar Level 1 challenge, Braille Translation

Instructions

This level should be straight forward. You will simply need to create a Braille lookup tables list or array and translate the words given to you in Braille. You will need to interpret if the letter is capital as well as spaces. Below is the Google Foobar challenge. I ended up looking up what the Braille Charchets should be from the Braille Wikipedia page. If you notice from the Braille page it shows the Braille dots for the letters A to Z but they do not match the pattern Google wants you use so I had to manually create a list in the correct binary order. Continue Reading