[Python] Checkio Solution 解答 – Xs and Os Referee

Tic-Tac-Toe, sometimes also known as Xs and Os, is a game for two players (X and O) who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal rows (NW-SE and NE-SW) wins the game.

閱讀更多

[Python] Checkio Solution 解答 – Even the Last

You are given an array of integers. You should find the sum of the elements with even indexes (0th, 2nd, 4th...) then multiply this summed number and the final element of the array together. Don't forget that the first element has an index of 0.

閱讀更多

[Python] Checkio Solution 解答 – Secret Message

Ever tried to send a secret message to someone without using the postal service? You could use newspapers to tell your secret. Even if someone finds your message, it's easy to brush them off and that its paranoia and a bogus conspiracy theory. One of the simplest ways to hide a secret message is to use capital letters. Let's find some of these secret messages.

閱讀更多

[Python] Checkio Solution 解答 – Three Words

Let's teach the Robots to distinguish words and numbers.

閱讀更多

[Python] Checkio Solution 解答 – Index Power

You are given an array with positive numbers and a number N. You should find the N-th power of the element in the array with the index N. If N is outside of the array, then return -1. Don't forget that the first element has the index 0.

閱讀更多

[Python] Checkio Solution 解答 – Fizz Buzz

"Fizz buzz" is a word game we will use to teach the robots about division. Let's learn computers.

閱讀更多

[Python] Checkio Solution 解答 – Long Repeat

This mission is the first one of the series. Here you should find the length of the longest substring that consists of the same letter. For example, line "aaabbcaaaa" contains four substrings with the same letters "aaa", "bb","c" and "aaaa". The last substring is the longest one which makes it an answer.

閱讀更多

[Python] Checkio Solution 解答 – Monkey Typing

The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite length of time will almost surely type out a given text, such as the complete works of John Wallis, or more likely, a Dan Brown novel.

閱讀更多

[Python] Checkio Solution 解答 – House Password

Stephan and Sophia forget about security and use simple passwords for everything. Help Nikola develop a password security check module. The password will be considered strong enough if its length is greater than or equal to 10 symbols, it has at least one digit, as well as containing one uppercase letter and one lowercase letter in it. The password contains only ASCII latin letters or digits.

閱讀更多

[Python] Checkio Solution 解答 – Non-Unique Elements

You are given a non-empty list of integers (X). For this task, you should return a list consisting of only the non-unique elements in this list. To do so you will need to remove all unique elements (elements which are contained in a given list only once). When solving this task, do not change the order of the list. Example: [1, 2, 3, 1, 3] 1 and 3 non-unique elements and result will be [1, 3, 1, 3].

閱讀更多

Copyright © Vantopics