Gelöst


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

mehr als ein Jahr vor

Gelöst


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

mehr als ein Jahr vor

Gelöst


Round to Nearest Multiple of 10^n

mehr als ein Jahr vor

Gelöst


print 'Hello W0rld'

mehr als ein Jahr vor

Gelöst


3n + 1 Problem (a.k.a The Collatz Conjecture)
The 3n + 1 problem (a.k.a The Collatz Conjecture) Consider the following algorithm to generate a sequence of numbers. Start wit...

mehr als ein Jahr vor

Gelöst


Conditional transpose II
As in problem 60734, you're given two vectors, x and y, which might be row or a column vectors. Your task is to ensure that y ha...

mehr als ein Jahr vor

Gelöst


Find all the indices when a value repetition occurs
Find all the sequences of consecutive repeated numbers in a numeric array, returning the indices where each sequence starts and ...

mehr als ein Jahr vor

Gelöst


Basic Identity Function
Create a function that takes an input x and returns the same value as output.

mehr als ein Jahr vor

Gelöst


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

mehr als ein Jahr vor

Gelöst


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

mehr als ein Jahr vor

Gelöst


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

mehr als ein Jahr vor

Gelöst


Count of Unique Elements of a Vector
Count the number of times each unique element appears in a vector. Example: Input x = [2 9 1 2 4 9 2] Output y = [1 1; 2 3; 4...

mehr als ein Jahr vor

Gelöst


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

mehr als ein Jahr vor

Gelöst


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

mehr als ein Jahr vor

Gelöst


reverse the order and combine a matrix

mehr als ein Jahr vor

Gelöst


Red Cross ❌

mehr als ein Jahr vor

Gelöst


Convert Cylindrical Cooridinates into Spherical Coordinate
For Cylindrical coordinate point, rho, fie (degrees) and z. Convert these points in Spherical Cooridinate System and save result...

mehr als ein Jahr vor

Gelöst


Matrix with increasing numbers (★★★★)

mehr als ein Jahr vor

Gelöst


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

mehr als ein Jahr vor

Gelöst


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

mehr als ein Jahr vor

Gelöst


Determine if a number is a cool number
A number is considered cool if it is 3 digits, has a 5 in it, and is divisible by 4.

mehr als ein Jahr vor

Gelöst


Palindrome String
Determine if the inputted string is a palindrome. That is, the string is the same forwards as it is backwards. For example: ...

mehr als ein Jahr vor

Gelöst


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

mehr als ein Jahr vor

Gelöst


Compare a value to a vector
Given a random value X and a random vector Y. you have to compare X to the Vector Y and make a decision. case 1: X is a value i...

mehr als ein Jahr vor

Gelöst


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

mehr als ein Jahr vor

Problem


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

mehr als ein Jahr vor | 0 | 13 Lösungsvorschläge

Gelöst


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

mehr als ein Jahr vor

Problem


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

mehr als ein Jahr vor | 1 | 13 Lösungsvorschläge

Gelöst


UICBioE240 problem 1.11
Store a series of numbers into a 4 by 4 matrix, starting with the first few positions going right and down, and leaving the rest...

mehr als ein Jahr vor

Gelöst


Calculo das raizes com Bhaskara
Dado três valores a, b e c. Calcule as raizes da equação ax² + bx + c = 0 * para raizes reais, deve ser arrendondado em 2 casas...

mehr als ein Jahr vor

Mehr laden