문제를 풀었습니다


Genetic markers test
Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1, ...

9년 초과 전

문제를 풀었습니다


Generate pi using logarithm
Generate pi using logarithm

9년 초과 전

문제를 풀었습니다


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

9년 초과 전

문제를 풀었습니다


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

9년 초과 전

문제를 풀었습니다


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

9년 초과 전

문제를 풀었습니다


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

9년 초과 전

문제를 풀었습니다


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

9년 초과 전

문제를 풀었습니다


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

9년 초과 전

문제를 풀었습니다


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

9년 초과 전

문제를 풀었습니다


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

9년 초과 전

문제를 풀었습니다


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

9년 초과 전

문제를 풀었습니다


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

9년 초과 전

문제를 풀었습니다


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

9년 초과 전

문제를 풀었습니다


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

9년 초과 전

문제를 풀었습니다


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

9년 초과 전

문제를 풀었습니다


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

9년 초과 전

문제를 풀었습니다


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

9년 초과 전

문제를 풀었습니다


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

9년 초과 전

문제를 풀었습니다


Binary Coder
Take an input number and print the binary value of this number.

9년 초과 전

문제를 풀었습니다


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

9년 초과 전

문제를 풀었습니다


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

9년 초과 전

문제를 풀었습니다


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

9년 초과 전

문제를 풀었습니다


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-D...

9년 초과 전

문제를 풀었습니다


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

9년 초과 전

문제를 풀었습니다


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

9년 초과 전

문제를 풀었습니다


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

9년 초과 전

문제를 풀었습니다


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

9년 초과 전

문제를 풀었습니다


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

9년 초과 전

문제를 풀었습니다


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

9년 초과 전

문제를 풀었습니다


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

9년 초과 전

더 보기