Gelöst


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

mehr als 2 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

mehr als 2 Jahre vor

Gelöst


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

mehr als 2 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

mehr als 2 Jahre vor

Gelöst


Square a Number
Given an input x, return y, which is equal to the square of x.

mehr als 2 Jahre vor

Gelöst


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

mehr als 2 Jahre vor

Problem


Calculate Wind Chill Factor
The NWS Wind Chill Temperature (WCT) index formula for calculating the dangers from winter winds and freezing temperatures: Cal...

mehr als 2 Jahre vor | 1 | 201 Lösungsvorschläge

Gelöst


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

mehr als 2 Jahre vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als 2 Jahre vor

Gelöst


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

mehr als 2 Jahre vor

Gelöst


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

mehr als 2 Jahre vor

Gelöst


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

mehr als 2 Jahre vor

Gelöst


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

mehr als 2 Jahre vor

Problem


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

mehr als 2 Jahre vor | 1 | 118 Lösungsvorschläge

Problem


Partial Pressure of Water Vapor from Relative Humidity
Buck (1996, 1981) published the following constants for the saturation pressure of water*: 6.1121 (mb) The saturation pressur...

mehr als 2 Jahre vor | 1 | 108 Lösungsvorschläge

Problem


Pressure for a given Above Sea Level Altitude
For altitudes up to the stratosphere (around 11 km above mean sea level), the air pressure can be estimated from: with where...

mehr als 2 Jahre vor | 2 | 124 Lösungsvorschläge

Problem


Air Density from Temperature and Pressure
The density of air can be estimated from the product of molar mass and molar density: Write a function that finds the densi...

mehr als 2 Jahre vor | 1 | 155 Lösungsvorschläge

Problem


Molar Air Density from Temperature and Pressure
The molar density of air can be found from the Temperature and Pressure using the ideal gas law. where the Molar density STP ...

mehr als 2 Jahre vor | 3 | 187 Lösungsvorschläge

Problem


Air Mass to Star for an Observer at Mean Sea Level
Air mass is a measure of how much atmosphere light from a source above the atmosphere (eg sun, planet, star) has to travel throu...

mehr als 2 Jahre vor | 5 | 340 Lösungsvorschläge

Problem


Predict Cricket Stridulation Rate from Air Temperature
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

mehr als 2 Jahre vor | 7 | 401 Lösungsvorschläge

Problem


Find Air Temperature from Cricket Stridulation Rate
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

mehr als 2 Jahre vor | 16 | 881 Lösungsvorschläge

Gelöst


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

mehr als 2 Jahre vor

Gelöst


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

mehr als 2 Jahre vor

Gelöst


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

mehr als 2 Jahre vor

Gelöst


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

mehr als 2 Jahre vor

Gelöst


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

mehr als 2 Jahre vor

Gelöst


Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

mehr als 2 Jahre vor

Gelöst


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

mehr als 2 Jahre vor

Gelöst


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

mehr als 2 Jahre vor

Gelöst


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

mehr als 2 Jahre vor

Mehr laden