Python345 1107. I love you, a little , a lot, passionately ... not at all Who remembers back to their time in the schoolyard, when girls would take a flower and tear its petals, saying each of the following phrases each time a petal was torn: "I love you" "a little" "a lot" "passionately" "madly" "not at all" If there are more than 6 petals, you start over with "I love you" for 7 petals, "a little" for 8 petals and so on. When the last petal was torn there were cries .. 2022. 11. 7. 1106. Grasshopper - Messi Goals Messi's Goal Total Use variables to find the sum of the goals Messi scored in 3 competitions Information Messi goal scoring statistics: Competition Goals La Liga 43 Champions League 10 Copa del Rey 5 Task Create these three variables and store the appropriate values using the table above: la_liga_goals champions_league_goals copa_del_rey_goals Create a fourth variable named total_goals that stor.. 2022. 11. 7. 1105. Remove exclamation marks Write function RemoveExclamationMarks which removes all exclamation marks from a given string. Solution: class RemoveExclamationMarks: def get(self, s): return s.replace("!", "") remove_exclamation_marks = RemoveExclamationMarks().get 2022. 11. 5. 1104. Sum Mixed Array Given an array of integers as strings and numbers, return the sum of the array values as if all were numbers. Return your answer as a number. sum_mix = lambda x: sum(map(int, x)) 2022. 11. 4. 1103. Welcome! Your start-up's BA has told marketing that your website has a large audience in Scandinavia and surrounding countries. Marketing thinks it would be great to welcome visitors to the site in their own language. Luckily you already use an API that detects the user's location, so this is an easy win. The Task Think of a way to store the languages as a database (eg an object). The languages are liste.. 2022. 11. 4. 1102. Welcome to the City Create a method sayHello/say_hello/SayHello that takes as input a name, city, and state to welcome a person. Note that name will be an array consisting of one or more values that should be joined together with one space between each, and the length of the name array in test cases will vary. Example: say_hello(['John', 'Smith'], 'Phoenix', 'Arizona') This example will return the string Hello, Joh.. 2022. 11. 2. 이전 1 ··· 12 13 14 15 16 17 18 ··· 58 다음