Rules
Create a class with 2 methods:
- roll(self, pins)
- score(self)
The rules for scoring are as follows
- A game is 10 frames
- Each frame can have up to 2 rolls
- A spare is when you knock down all pins in a frame
Create a class with 2 methods:
The rules for scoring are as follows
You've just created a virtual vending machine that will dispense widgets of programming goodness when a user puts money into the machine. The machine should dispense the proper change. You now need the programming logic to determine which coins to dispense.
Write a program that will correctly determine the least number of coins to be given to the user such that the sum of the coins' value would equal the correct amount of change.
About this Kata
This Kata is about implementing a simple tennis game. I came up with it while thinking about Wii tennis, where they have simplified tennis, so each set is one game.
The scoring system is rather simple:
How good are the tests you've been writing all day, and yesterday?
We're going to use mut.py to run our mutation tests. There are a LOT of options for mutation testing in python, if you find a better one, tell me about it.
Installing mut.py into the environment
These are a few exercises to get used to using mocking.
Take a list of array elements and group them.
[1, 2, 3, 4, 5]
[[source]] | |
name = "pypi" | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
[dev-packages] | |
[packages] | |
keras = "*" | |
tensorflow = "*" |
<?php | |
namespace Armakuni\Demo\PhpInserter; | |
use Google\Cloud\PubSub\PubSubClient; | |
class MessageSenderService | |
{ |
<?php | |
namespace Armakuni\Demo\PhpCounter; | |
use Google\Cloud\Datastore\DatastoreClient; | |
class CounterService | |
{ |
#!/usr/bin/env bash | |
docker build -t gcr.io/$(gcloud config get-value project)/simple-example:latest . | |
docker push gcr.io/$(gcloud config get-value project)/simple-example | |
gcloud beta run deploy --image gcr.io/$(gcloud config get-value project)/simple-example:latest |
#!/usr/bin/env bash | |
docker build -t image-name . | |
docker run -e PORT=8080 -p 8080:8080 -d --name container-name image-name | |
docker logs container-name | |
curl localhost:8080 | |
docker stop container-name |