This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| answer=random.randint(1,400) | |
| gass=0 | |
| a=1 | |
| gass=input("請輸入你的智商") | |
| while gass!=0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005456541825216415128481845562: | |
| if answer<int(gass)<100: | |
| gass=input("你太高估自己了") | |
| elif answer==int(gass): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| n=10 | |
| for i in range(1,n+1): | |
| r=random.randint(1,18) | |
| t=random.randint(1,18) | |
| print("第"+str(i)+"個紅色方塊座標為("+str(r)+","+str(t)+")") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| every gist is a git repostory,which means that it can be forkd=ed and clowned.If you are signed in to | |
| github when you create a gist will be associated with your account and you will see it in your list of gist when you negate to your gist home page. | |
| gist can be public or secret .public gists show up in Discover,where people can browse new gists as they're creat gist to a friend,they'll be aable to see it. | |
| however,if someone you don't know discovers the URL, they'll also be able to see your dist.If you need to keep your code awar from prying eyes,you mat want to create a private repository instead. | |
| After creating a gist, you cannot convert it form public to secret. | |
| You'll receive a notification when: | |
| You are the author of a gist. | |
| Someone mentions you in a gist. | |
| You subscibe to a gist,by clicking Subscibe at the top of any gist. | |
| You can pin gists to your profile so other people can see them easilr. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gist是github的一個服務,而且任何人都可以使用這個服務,不論你是否擁有github帳號。以開發者的角度來說, | |
| 最基本的功能就是可以分享片段的原始碼。有別於github的repository,gist可以只分享專案中的某一個小檔案中的原始碼, | |
| 且擁有私人選項,讓別人不會搜尋到你的gist。在githun的reprosigist設定privat是要付費的,但gist是不需要的。除此之外gist還有許多用處, | |
| 包括可以直接執行我們就來一一介紹吧的。 | |
| 7分31.12秒 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from browser import html | |
| from browser import document as doc | |
| from browser import timer | |
| canvas = html.CANVAS(width = 400, height = 200) | |
| canvas.id = "game-board" | |
| brython_div = doc["brython_div"] | |
| brython_div <= canvas | |
| brython_div <= html.BUTTON("開始", id="power") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from browser import html | |
| from browser import document as doc | |
| import browser.timer | |
| canvas = html.CANVAS(width = 400, height = 100) | |
| canvas.id = "game-board" | |
| brython_div = doc["brython_div"] | |
| brython_div <= canvas | |
| ctx = canvas.getContext("2d") | |
| px = 0 |