Skip to content

simplonco/php-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

PHP challenges

Training / PHP / Challenges

Most of these problems are taken from exercism.io !

Red light

The exercises are ordered roughly in order of difficulty, but it's a bit haphazard.

How to run tests locally?

# Install PHPUnit:
$ wget https://phar.phpunit.de/phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit

# Go inside your project folder and:
$ phpunit *test.php --verbose

http://www.commitstrip.com/fr/2016/02/22/when-the-functional-tests-are-all-red/

Hello World 

Write a program that greets the user by name, or by saying "Hello, World!" if no name is given.

README

Hamming 

Write a program that can calculate the Hamming difference between two DNA strands.

README

Gigasecond 

Write a program that will calculate the date that someone turned or will celebrate their 1 Gs anniversary.

README

Bob 

Bob is a lackadaisical teenager. In conversation, his responses are very limited.

README

Pangram 

Determine if a sentence is a pangram.

README

Rna Transcription 

Write a program that, given a DNA strand, returns its RNA complement (per RNA transcription).

README

Raindrops 

Write a program that converts a number to a string, the contents of which depends on the number's prime factors.

README

Isogram 

Determine if a word or phrase is an isogram.

README

Difference Of Squares 

Find the difference between the sum of the squares and the square of the sums of the first N natural numbers.

README

Largest Series Product 

Write a program that, when given a string of digits, can calculate the largest product for a contiguous substring of digits of length n.

README

Roman Numerals 

Write a function to convert from normal numbers to Roman Numerals: e.g.

README

Pig Latin 

Implement a program that translates from English to Pig Latin

README

Robot Name 

Write a program that manages robot factory settings.

README

Leap 

Write a program that will take a year and report if it is a leap year.

README

Word Count 

Write a program that given a phrase can count the occurrences of each word in that phrase.

README

Anagram 

Write a program that, given a word and a list of possible anagrams, selects the correct sublist.

README

Trinary 

Write a program that will convert a trinary number, represented as a string (e.g. '102012'), to its decimal equivalent using first principles.

README

Bowling 

Score a bowling game

README

Clock 

Implement a clock that handles times without dates.

README

Wordy 

Write a program that takes a word problem and returns the answer as an integer.

README

Connect 

Compute the result for a game of Hex / Polygon

README

Change 

Write a program that will correctly determine change to be given using the least number of coins

README

About

It will maybe hurt a bit, but for your good! 🌵

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published