Risolto


Creating a code via test suite :)
Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

quasi 7 anni fa

Risolto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

quasi 7 anni fa

Risolto


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

quasi 7 anni fa

Risolto


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

quasi 7 anni fa

Risolto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

quasi 7 anni fa

Risolto


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

quasi 7 anni fa

Risolto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

quasi 7 anni fa

Risolto


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

quasi 7 anni fa

Risolto


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

quasi 7 anni fa

Risolto


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

quasi 7 anni fa

Risolto


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

quasi 7 anni fa

Risolto


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

quasi 7 anni fa

Risolto


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

quasi 7 anni fa

Risolto


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

quasi 7 anni fa

Risolto


Calculate some equation
Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

quasi 7 anni fa

Risolto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

quasi 7 anni fa

Risolto


Area of rhombus
Calculate the rhombus area

quasi 7 anni fa

Risolto


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

quasi 7 anni fa

Risolto


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

quasi 7 anni fa

Risolto


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

quasi 7 anni fa

Risolto


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

quasi 7 anni fa

Risolto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

quasi 7 anni fa

Risolto


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

quasi 7 anni fa

Risolto


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

quasi 7 anni fa

Risolto


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

quasi 7 anni fa

Risolto


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

quasi 7 anni fa

Risolto


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

quasi 7 anni fa

Risolto


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

quasi 7 anni fa

Risolto


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

quasi 7 anni fa

Carica altro