A résolu


Logic variables
* Assign isAvailable with true.

presque 12 ans il y a

A résolu


Declaring a string
* Assign streetAddress with the string 1313 Mockingbird Lane.

presque 12 ans il y a

A résolu


Character variable: Compass direction
* Assign compassDirection with sensorReading's value. Both are character variables.

presque 12 ans il y a

A résolu


Declaring a character
* Assign middleInitial with the character T.

presque 12 ans il y a

A résolu


Computing wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

presque 12 ans il y a

A résolu


Compute total cost
A drink costs 2 dollars. A taco costs 3 dollars. Write a statement that assigns totalCost with the total meal cost given the num...

presque 12 ans il y a

A résolu


Write an expression
Assigns finalResult with firstSample plus secondSample, divided by 3. Ex: If firstSample is 18 and secondSample is 12, finalResu...

presque 12 ans il y a

A résolu


Circle area using pi
Write a statement that assigns circleArea with the circle's area given circleRadius. Use the built-in mathematical constant pi. ...

presque 12 ans il y a

A résolu


Fahrenheit to Celsius using multiple statements
°C = (°F - 32) x 5/9 * Write a statement that assigns fractionalMultiplier with 5/9. * Write a second statement that assign...

presque 12 ans il y a

A résolu


Assigning a sum
* Write a statement that assigns numCoins with numNickels + numDimes.

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


Plus x: A first program
_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

presque 12 ans il y a

A résolu


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

presque 12 ans il y a

A résolu


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

presque 12 ans il y a

A résolu


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

presque 12 ans il y a

A résolu


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

presque 12 ans il y a

A résolu


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

presque 12 ans il y a

A résolu


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

presque 12 ans il y a

Problème


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

presque 12 ans il y a | 3 | 143 solveurs

A résolu


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

presque 12 ans il y a

A résolu


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

presque 12 ans il y a

A résolu


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

presque 12 ans il y a

A résolu


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

presque 12 ans il y a

A résolu


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

presque 12 ans il y a

A résolu


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

presque 12 ans il y a

A résolu


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

presque 12 ans il y a

A résolu


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

presque 12 ans il y a

A résolu


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

presque 12 ans il y a

A résolu


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

presque 12 ans il y a

A résolu


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

presque 12 ans il y a

Charger plus