Problem


Max Sum That You Can Get Of 2 Numbers given variable input
Given variable input length,combine 2 numbers from and output maximum sum the combinations can generate Example x = 3; y = 5;...

etwa 10 Jahre vor | 7 | 62 Lösungsvorschläge

Gelöst


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

etwa 10 Jahre vor

Gelöst


Writing a nested function: BMI calculation
Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...

etwa 10 Jahre vor

Gelöst


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

etwa 10 Jahre vor

Problem


Move if I am Optimus Prime
If the number is a prime, roll out!

etwa 10 Jahre vor | 8 | 40 Lösungsvorschläge

Gelöst


Moving target
Write a function with persistent variables currentLocationX and currentLocationY that store an object's location. Each call to t...

etwa 10 Jahre vor

Problem


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

etwa 10 Jahre vor | 9 | 67 Lösungsvorschläge

Gelöst


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

etwa 10 Jahre vor

Problem


Primes Checker
Given variable inputs Check if they are prime numbers

etwa 10 Jahre vor | 8 | 65 Lösungsvorschläge

Gelöst


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

etwa 10 Jahre vor

Problem


Combine the digits to output numbers
input could be of any length e.g. 1. in1 = 1 in2 = 2 output = 12 2. in1 = 2 in2 = 1 in3 = 0 output = 210

etwa 10 Jahre vor | 8 | 58 Lösungsvorschläge

Gelöst


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

etwa 10 Jahre vor

Gelöst


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

etwa 10 Jahre vor

Gelöst


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

etwa 10 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...

etwa 10 Jahre vor

Gelöst


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

etwa 10 Jahre vor

Gelöst


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

etwa 10 Jahre vor

Gelöst


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

etwa 10 Jahre vor

Gelöst


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

etwa 10 Jahre vor

Gelöst


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

etwa 10 Jahre vor

Gelöst


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

etwa 10 Jahre vor

Problem


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

etwa 10 Jahre vor | 9 | 199 Lösungsvorschläge

Problem


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

etwa 10 Jahre vor | 10 | 95 Lösungsvorschläge

Problem


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

etwa 10 Jahre vor | 8 | 42 Lösungsvorschläge

Gelöst


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

etwa 10 Jahre vor

Gelöst


Valid Chess Moves
Using <http://en.wikipedia.org/wiki/Algebraic_chess_notation standard Algebraic notation> ('' for a pawn), given previous move a...

etwa 10 Jahre vor

Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (http://en.wikipedia.org...

etwa 10 Jahre vor

Gelöst


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

etwa 10 Jahre vor

Gelöst


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

etwa 10 Jahre vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

etwa 10 Jahre vor

Mehr laden