watayan / pypen Goto Github PK
View Code? Open in Web Editor NEWWaPENの文法をPythonっぽくしたもの
License: MIT License
WaPENの文法をPythonっぽくしたもの
License: MIT License
a=[0,1,2,3,4,5]
aに6を追加する
aに[7,8]を連結する
これはPyPENの文法マニュアルから引っ張ってきたものです。
これを実行すると、aが[0,1,2,3,4,5,6,7,8]になると私は考えていましたが、実際に実行すると以下のエラーが発生して強制終了してしまいます。
実行時エラーです
3行目:配列でない値を連結することはできません
今は初期化されていない変数を読み出すと適当に0とか空文字列になるようにしているが,これを禁止したい(NullValueを廃止する)。それと同時に,配列も長さを超えてなにかしようとしたときにはエラーにし,その代わりappendやextendにあたるものを実装する。
#設定
atari=7 #あたりの設定
play1=100 #1プレイあたりの購入金額
#プレイ回数の処理
表示する("福引きゲームをしましょう")
表示する("今日は何円お買い上げでしたか?")
moneyに整数を入力する
play=money//play1 #プレイ回数の計算
表示する("今日は"とplayと"回挑戦できます")
#福引きゲームの処理
i=1
i<=playの間:
#入力
表示する(iと"回目の挑戦!")
表示する("1から10までの好きな数字を入力してください")
userに整数を入力する
#判定・出力
もしuser==atariならば:
表示する("あたり!")
表示する("さすがです!!")
繰り返しを抜ける
そうでなくもしuser<atariならば:
表示する("残念でした…あたりはもっと大きいです")
表示する("また挑戦してね")
そうでなければ:
表示する("残念でした…あたりはもっと小さいです")
表示する("また挑戦してね")
i=i+1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.