-
Repeat Built-in Functions And Find The Best Crossing Of Words
![](https://d17mnqrx9pmt3e.cloudfront.net/media/blog/share/222_1_1.png)
Hello, checkiomates๐ฑโ๐ค!
In this digest we offer you a guide with basics of built-in functions. A few of them you may immediately try in a new mission about crossing words!
๐กTIP
On Easy difficulty, each of the few starting stations is dedicated to a distinct data type. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
๐MISSION
Crossed Words by freeman_lex -
Given a horizontal word and a vertical word, your task is to find the best crossing letter between them, defined as the letter that allows the rightmost crossing in the horizontal word and, in the event of a tie, the lowest crossing in the vertical word. You need to return a tuple of two integers: 1-based indexes of common letter in horizontal and vertical words respectively. If there is no common letter return -1, -1.
crossed_words("PATO", "PELE") == (1, 1) crossed_words("ANJO", "MENTORA") == (4, 5) crossed_words("URUBU", "POLIVALENTE") == (-1, -1)
๐ARTICLE
Python's Built-in Functions: A Complete Exploration -
Python has many built-in functions that you can use directly without importing anything. These functions cover a wide variety of common programming tasks that include performing math operations, working with built-in data types, processing iterables of data, handling input and output in your programs, working with scopes, and more.
๐ฉโ๐ปCODE SHOT
How do you think, what the following code does?
def ????????(values: set, one: int) -> int: return min(values, key=lambda k: (abs(k-one), k))
๐ Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! โคต
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