スーパーで買い物したときの支払金額を計算する
以下の商品リストがあるとする。先頭の数字は商品番号。
- りんご 100円
- みかん 40円
- ぶどう 150円
- のり弁 350円
// ==UserScript== | |
// @name Facebook cleaner | |
// @namespace http://yattom.jp | |
// @include https://www.facebook.com/ | |
// @version 2 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
// 右側の、上から3番目のエリアに、People You May Knowや、広告が表示される。それを非表示にする。 | |
var ego_section = document.getElementsByClassName("ego_section"); |
import sys | |
from du import main | |
if __name__=='__main__': | |
if len(sys.argv) > 1: | |
main.main(sys.argv[1]) | |
else: | |
main.main() |
いろいろな計算ができる計算機を作ってください。以下のインターフェースはあくまで一例(イメージ)です。
calc("+", 3, 4) => 7
calc("-", 10, 4) => 6
PLoP(Pattern Language of Programming)のイベントで知ったアイスブレークがあります。
在庫管理システムをモデリングしてください。 | |
以下の機能が必要です。 | |
* 商品ごとに在庫がいくつあるか管理できる | |
* 出荷時に、倉庫に対して何をいくつ出荷するかピッキングリストを表示する | |
* 商品の変化(入荷、出荷、移動、など)をすべて記録し、履歴が残る | |
## ユースケース001 | |
前提: 商品Aが50個在庫している |
# cola/lib/vending_machine.rb | |
class VendingMachine | |
attr_reader :dispense_box | |
attr_reader :refund_box | |
attr_accessor :zaiko_count | |
def initialize | |
@zaiko_count = 1 | |
end |
function prompt() { | |
Write-Host "[" -nonewline | |
Write-Host "$(Get-Location)" -foregroundcolor Cyan -nonewline | |
Write-Host "]" -nonewline | |
Write-Host " ${env:USERNAME}@${env:COMPUTERNAME}" -foregroundcolor Magenta | |
"> " | |
} | |
function Add-Path($path) { | |
if("" -eq $path) { |
研修、トレーニング、ワークショップ 1回(1日) 15万円 |
First you want some software. You know what you want, so it makes sense that it’s most convenient if the the software is built by yourself.
Unfortunately (or luckily) you’re too busy doing your own stuff to write a software. You call up someone and ask him to write the software for you. You save time and he got a job. Win-Win!
But wait. He needs to understand what you want. You need to tell the developer what you want. You need communication. One of the problems of communication is you cannot tell if you successfully communicated. You ask something. The only way to see if your request is communicated right is to see the resulting product. The developer show the product as a proof of the communication.
Time is money. If it proves wrong after several months, ah-oh. It’s wasted time. You don’t want to waste time or money. You want to see the proof early, as early as possible. So the developer wants to, for the sake of a satisfied customer, create only a small chunk of software and show it to yo