A résolu


Turn year differences into "s score and y years ago"
President Lincoln opened his now-legendary Gettysburg Address with the famous words "Four score and seven years ago...". Given t...

4 mois il y a

A résolu


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

4 mois il y a

A résolu


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

4 mois il y a

A résolu


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

4 mois il y a

A résolu


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

4 mois il y a

A résolu


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

4 mois il y a

A résolu


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string inStr from a list of strings strList....

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

4 mois il y a

A résolu


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

4 mois il y a

A résolu


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

4 mois il y a

A résolu


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

4 mois il y a

A résolu


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

4 mois il y a

A résolu


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

4 mois il y a

A résolu


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

4 mois il y a

A résolu


Recaman Sequence - I
Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow; seq(0) = 0; for n > 0, seq(n) ...

4 mois il y a

A résolu


Area of Ellipse

4 mois il y a

A résolu


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 (see Wikipedia: http://e...

4 mois il y a

A résolu


Resistance of a robot
What is the resistance of an industrial robot that draws P watts of power when connected to a power supply delivering V volts? R...

4 mois il y a

A résolu


Coefficient of Static friction
The coefficient of static friction between two surfaces is u. What force must be used to move a W lb. crate on a horizontal sur...

4 mois il y a

A résolu


The Top 5 Primes
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

4 mois il y a

A résolu


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

4 mois il y a

A résolu


Resistance in a circuit
Two resistors with values of 6.0 ohms and 12 ohms are connected in parallel. This combination is connected in series with a 4 o...

4 mois il y a

A résolu


Calculate the acceleration of a crate
What is the acceleration of a crate if two robots apply F1 N and F2 N of force respectively and a frictional force of FR N acts ...

4 mois il y a

A résolu


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

4 mois il y a

A résolu


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

4 mois il y a

A résolu


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

4 mois il y a

A résolu


Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

4 mois il y a

A résolu


Linear Motion 3
Suppose a robot is moving in a straight line and steadily increases its speed. It moves from v1 ft/s to v1+2 ft/s in the first ...

4 mois il y a

A résolu


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

4 mois il y a

Charger plus