• This week’s missions: Landing Site and Power Plants

checkio

Hi, there

Great news! We’ve significantly improved website’s speed performance. Enjoy!

Better handling DataTypes: Now your function can return any iterable as well as numpy types (including np.array)

Test yourself and have fun with the missions we have for you:

The first mission is called the “Landing Site” created by kurosawa4434 and here you need to find a set of all the candidate landing sites by being given a set of obstacle hexes on the Moon.

assert landing_site({'E5', 'E7', 'F4', 'F6', 'G4', 'G6', 'H3', 'H5'}) == {'C3', 'J7'}
assert landing_site({'A4', 'C2', 'C6', 'C9', 'D4', 'D7', 'F1', 'F5',
                    'F8', 'G4', 'H7', 'I2', 'I5', 'I9', 'K3', 'K8', 'L5'}) == {'B7', 'E3', 'J6'}

The second one is “Power Plants” created by kurosawa4434 where you have to place the given power plants in a proper way and supply power to all the cities.

power_plants({('A', 'B'), ('B', 'C'), ('C', 'D'), ('D', 'E')}, [2]) == {'C': 2}
power_plants({('A', 'B'), ('B', 'C'), ('C', 'D'), ('D', 'E'), ('E', 'F')}, [1, 1]) == {'B': 1, 'E': 1}
power_plants({('A', 'B'), ('B', 'C'), ('A', 'D'), ('B', 'E')}, [1, 0]) == {'B': 1, 'D': 0}
    Check out some interesting articles we’ve selected for you:
  • Check out the latest curated collection of useful Python snippets that you can understand in 30 seconds or less.
  • What are the main topics that distinguish an advanced developer from a just effective enough Python programmer? Go through the main expert Python topics that can make your code more idiomatic, and some advanced functionalities you need to be familiar as an advanced Python developer.
  • Learn how to use threads in Python. This is a great video tutorial for those who want to know how to run code concurrently using the threading module.

The users who’ve made the TOP 3 this month are gatto_volante, stonegz, and xffox. You are doing great, guys! Keep on coding!

Become Awesome

  • No Ads
  • No Limits
  • More Content

Welcome to CheckiO - games for coders where you can improve your codings skills.

The main idea behind these games is to give you the opportunity to learn by exchanging experience with the rest of the community. Every day we are trying to find interesting solutions for you to help you become a better coder.

Join the Game