본문 바로가기

%4

BASICS: Length based SELECT with LIKE You will need to create SELECT statement in conjunction with LIKE. Please list people which have first_name with at least 6 character long names table schema id first_name last_name results table schema first_name last_name Solution: SELECT first_name, last_name FROM names WHERE first_name LIKE '______%' Percent Sign (%): represents zero or more unspecified characters Under Score(_) : Represents.. 2022. 6. 8.
Grasshopper - Check for factor This function should test if the factor is a factor of base. Return true if it is a factor or false if it is not. About factors Factors are numbers you can multiply together to get another number. 2 and 3 are factors of 6 because: 2 * 3 = 6 You can find a factor by dividing numbers. If the remainder is 0 then the number is a factor. You can use the mod operator (%) in most languages to check for.. 2022. 5. 26.
Even numbers in an array Given an array of numbers, return a new array of length number containing the last even numbers from the original array (in the same order). The original array will be not empty and will contain at least "number" even numbers. For example: ([1, 2, 3, 4, 5, 6, 7, 8, 9], 3) => [4, 6, 8] ([-22, 5, 3, 11, 26, -6, -7, -8, -9, -8, 26], 2) => [-8, 26] ([6, -25, 3, 7, 5, 5, 7, -3, 23], 1) => [6] Solutio.. 2022. 5. 6.
Is n divisible by x and y? Description: Create a function that checks if a number n is divisible by two numbers x AND y. All inputs are positive, non-zero digits. Examples: 1) n = 3, x = 1, y = 3 => true because 3 is divisible by 1 and 3 2) n = 12, x = 2, y = 6 => true because 12 is divisible by 2 and 6 3) n = 100, x = 5, y = 3 => false because 100 is not divisible by 3 4) n = 12, x = 7, y = 5 => false because 12 is neith.. 2022. 3. 25.