Little Lena's book of puzzles contains the following challenge. The goal is to connect each fruit with the correct color.Because little Lena is a bit stubborn (or because she's too young), she takes pleasure in randomly connecting the fruits with the colors. However, she always makes sure that each fruit is connected with at most one color and that each color is connected with at most one fruit...
A zigzag sorted sequence of integers a0,a1,a2,a3,a4,…a0,a1,a2,a3,a4,… is a sequence wherea0≥a1≤a2≥a3≤a4≥…a0≥a1≤a2≥a3≤a4≥…In other words, the sequence alternates between larger and smaller integers: the first is larger than or equal to the second, the second is smaller than or equal to the third, the third is larger than or equal to the fourth, and so on. Here's an example of such a zigzag sorted..
The algorithm for constructing a Kaprekar series was discovered in 1949 by the Indian mathematical Dattaraya Ramachandra Kaprekar. It was originally described for numbers with four digits, but can be easily generalized for numbers with kk digits.The Kaprekar series for a number nn is represented as a list whose first element is nn. The next number is calculated as the difference K(n)=n′−n′′K(n)=..
In genetics, a distinction is made between two types of mutations (the replacement of one nucleotide by a different nucleotide). A transition changes a purine nucleotide (two rings) into another purine (A ↔ G), or changes a pyrimidine nucleotide (one ring) into another pyrimidine (C ↔ T). All other mutations in which a purine is substituted for a pyrimidine, or vice versa, are called transversio..
If we value each letter corresponding to its position in the alphabet, we may compute the value of a word as the sum of the values of its individual letters. We can use this procedure to hunt for word sums. A word sum is a sequence of (usually two) words whose sum of word values equals the word value of another word that can be associated with the sequence of words.KING + CHAIR = THRONEChecking ..
Penney Ante is a gambling game in which two players each name a different sequence of outcomes of coin tosses, where both sequences must have the same length. For example heads-heads-tails, or HHT. Then a coin is flipped repeatedly until one of the sequences appears. The player who named that sequence, wins the game.Is there any strategy that gives one player a higher probability of winning the ..
What's so special about the number 105263157894736842? This number doubles if you move the rightmost digit to the front of the number. In addition, this is the smallest natural number that has this property.In general, a positive natural number that can be multiplied by nn by moving the rightmost digit to the front of the number is called an nn-parasitic number. Here nn is itself a single-digit ..
클로저는 일반 함수와 다르게, 자신(inner function)의 영역밖에서 호출된 함수의 변수값과 레퍼런스를 복사, 저장 접근을 가능하게 한다. def sort_priority(values, group): def helper(x): if x in group: return 0, x return 1, x values.sort(key=helper) numbers = [8, 33, 1, 2, 5, 4, 7, 6] group = {2, 3, 5, 7} sort_priority(numbers, group) print(numbers) sort_priority 의 동작은 group 이라는 집합에 포함되어 있으면 오름차순에서 우선순위를 준다. 멤버십 테스트를 통과 여부에 따라 0, 1의 가중치를 두어서 두그룹으로 분류..
The computer program cowsay generates ASCII pictures of a cow with a message.+----------------------------+| Moo may represent an idea, || but only the cow knows. |+----------------------------+ \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||The program initially started more or less as an inside joke within hacker culture, but has been around long enough that its use has become rather widespre..
- Total
- Today
- Yesterday
- wsgi
- django chatbot
- chatbot
- 파이썬
- Python
- 모바일 스킨 적용
- GIT
- gitignore
- 파이썬 프로그래밍
- PuTTYGen
- virtualenv
- 파이썬 독학
- admin.py
- 문과 코딩
- 파이썬 강좌
- 문서 비교
- 면접정답
- 파이썬 입문
- 장고 카톡 자동응답
- 장고 플러스친구 자동응답
- Tistory
- 장고
- gitlab
- pycrypto
- 면접답변
- 모바일 테마 적용
- django
- 엑셀 비교
- 이미지 비교
- 플러스친구 자동응답
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |