This week’s missions: Searchlights and Inscribe a Contour
Test yourself and have fun with the new missions we have for you:
The first mission was created by kurosawa4434 and is called the “Searchlights”, where your task is to determine the number of the regular polygons can you see in the light.
searchlights([(2, 3, 2, 3)], [(1, 2, 1)]) == 1 # regular triangle searchlights([(4, 5, 2, 4)], [(4, 4, 3)]) == 4 # square
The second one is the “Inscribe a Contour” mission created by quarkov, where you are given a list of dots, each represents a projection of a 3D model vertex onto a horizontal plane and you need to find the smallest rectangle (by its area) into which all the given dots (and thus the projected contour) can be inscribed.
inscribe([(1, 1), (1, 2), (0, 2), (3, 5), (3, 4), (4, 4)]) == 6.0 #example №1 inscribe([(6, 5), (10, 7), (2, 8)]) == 20.0 #example №2 inscribe([(2, 3), (3, 8), (8, 7), (9, 2), (3, 2), (4, 4), (6, 6), (7, 3), (5, 3)]) == 41.538 #example №3
Check out some interesting articles we’ve selected for you:
- Check out the course specifically designed for beginners who are new to computer science or who are willing to learn or improve their skills in programming. It's open source and made as per industry standard.
- We all know that Python has a colon (:) after all statements that start a new block: if, for, while, def, class, with, else. However, the colon looks redundant. So, why does Python actually have it? Find out the story behind this symbol!
- What’s New In Python 3.9 See the explanation of the new features in Python 3.9, compared to 3.8.
The users who’ve made the TOP 3 this month are mortonfox, flpo, and kkkkk. You are doing great, guys! Keep on coding!
- 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