문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제


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

대략 10년 전 | 8 | 솔버 수: 40

문제를 풀었습니다


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

대략 10년 전

문제


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

대략 10년 전 | 9 | 솔버 수: 67

문제를 풀었습니다


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

대략 10년 전

문제


Primes Checker
Given variable inputs Check if they are prime numbers

대략 10년 전 | 8 | 솔버 수: 65

문제를 풀었습니다


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

대략 10년 전

문제


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

대략 10년 전 | 8 | 솔버 수: 58

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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)

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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 ...

대략 10년 전

문제


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

대략 10년 전 | 9 | 솔버 수: 199

문제


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

대략 10년 전 | 10 | 솔버 수: 95

문제


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

대략 10년 전 | 8 | 솔버 수: 42

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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...

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

대략 10년 전

더 보기