일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Sorted
- LOWER
- range
- slice
- and
- iNT
- or
- join
- STR
- list
- sum
- WECODE
- lambda
- SQL
- Algorithm
- index
- 위코드
- js
- MAX
- DART
- Python
- decorator
- enumerate
- count
- len
- split
- 파이썬
- map
- FOR
- If
- Today
- Total
목록LOWER (16)
코드로 우주평화
Complete the function, which calculates how much you need to tip based on the total amount of the bill and the service. You need to consider the following ratings: Terrible: tip 0% Poor: tip 5% Good: tip 10% Great: tip 15% Excellent: tip 20% The rating is case insensitive (so "great" = "GREAT"). If an unrecognised rating is received, then you need to return: "Rating not recognised" in Javascript..
altERnaTIng cAsE ALTerNAtiNG CaSe Define String.prototype.toAlternatingCase (or a similar function/method such as to_alternating_case/toAlternatingCase/ToAlternatingCase in your selected language; see the initial solution for details) such that each lowercase letter becomes uppercase and each uppercase letter becomes lowercase. For example: "hello world".toAlternatingCase() === "HELLO WORLD" "HE..
This is a beginner friendly kata especially for UFC/MMA fans. It's a fight between the two legends: Conor McGregor vs George Saint Pierre in Madison Square Garden. Only one fighter will remain standing, and after the fight in an interview with Joe Rogan the winner will make his legendary statement. It's your job to return the right statement depending on the winner! If the winner is George Saint..
The wide-mouth frog is particularly interested in the eating habits of other creatures. He just can't stop asking the creatures he encounters what they like to eat. But, then he meets the alligator who just LOVES to eat wide-mouthed frogs! When he meets the alligator, it then makes a tiny mouth. Your goal in this kata is to create complete the mouth_size method this method takes one argument ani..
Write a function that checks if a given string (case insensitive) is a palindrome. Solution: def is_palindrome(s): target = s.lower() for i in range(len(target)//2): if target[i] != target[-i-1]: return False return True def is_palindrome(s): s = s.lower() return s == s[::-1]
Given a string of arbitrary length with any ascii characters. Write a function to determine whether the string contains the whole word "English". The order of characters is important -- a string "abcEnglishdef" is correct but "abcnEglishsef" is not correct. Upper or lower case letter does not matter -- "eNglisH" is also correct. Return value as boolean values, true for the string to contains "En..
Given a string, capitalize the letters that occupy even indexes and odd indexes separately, and return as shown below. Index 0 will be considered even. For example, capitalize("abcdef") = ['AbCdEf', 'aBcDeF']. See test cases for more examples. The input will be a lowercase string with no spaces. Good luck! Solution: def capitalize(s): return [''.join(v.lower() if i%2==1 else v.upper() for i, v i..
In this Kata, you will be given a string that may have mixed uppercase and lowercase letters and your task is to convert that string to either lowercase only or uppercase only based on: make as few changes as possible. if the string contains equal number of uppercase and lowercase letters, convert the string to lowercase. For example: solve("coDe") = "code". Lowercase characters > uppercase. Cha..
Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc. You need to return the highest scoring word as a string. If two words score the same, return the word that appears earliest in the original string. All letters will be lowercase and all inputs will be valid. Solution: def high..
Welcome. In this kata you are required to, given a string, replace every letter with its position in the alphabet. If anything in the text isn't a letter, ignore it and don't return it. "a" = 1, "b" = 2, etc. Example alphabet_position("The sunset sets at twelve o' clock.") Should return "20 8 5 19 21 14 19 5 20 19 5 20 19 1 20 20 23 5 12 22 5 15 3 12 15 3 11" ( as a string ) Solution: from typin..