{"id":824118,"student_id":10,"content":"from game import *\nfrom random import *\n\ndice1 = create_sprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png')\ndice2 = create_sprite('0.png', '1.png', '2.png', '3.png', '4.png', '5.png')\n\nbalance = 1000\nbet = 0\nclock = 0\nguess = False\n\ndef loop():\n global clock\n clock -= 1\n if clock \u003e 0: shake()\n if clock == 0: check()\n draw_text('財產:' + str(balance) + '$')\n\ndef shake():\n dice1.costume_id = randrange(6)\n dice2.costume_id = randrange(6)\n \ndef check():\n global balance\n balance -= 100\n total = dice1.costume_id + dice2.costume_id + 2\n if total \u003e= 8 and guess == True: balance += 200\n if total \u003c= 6 and guess == False: balance += 200\n \ndef onclick():\n global big, clock\n guess = bool(input('True 猜大 False 猜小'))\n clock = 120\n \non('click', onclick)","created_at":"2024-08-20T10:59:54.353+08:00","updated_at":"2024-08-21T18:51:11.298+08:00","name":"比大小","language":"python","screenshot":{"url":null},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":28,"hashid":"ej9s66jmm","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":18156858,"file_name":"cloud.png","project_id":824118,"asset_id":302343,"created_at":"2024-08-20T10:59:54.359+08:00","updated_at":"2024-08-20T10:59:54.359+08:00"},{"id":18156859,"file_name":"bg.jpg","project_id":824118,"asset_id":302344,"created_at":"2024-08-20T10:59:54.360+08:00","updated_at":"2024-08-20T10:59:54.360+08:00"},{"id":18156860,"file_name":"calm.mp3","project_id":824118,"asset_id":302345,"created_at":"2024-08-20T10:59:54.361+08:00","updated_at":"2024-08-20T10:59:54.361+08:00"},{"id":18156861,"file_name":"koding.png","project_id":824118,"asset_id":302346,"created_at":"2024-08-20T10:59:54.362+08:00","updated_at":"2024-08-20T10:59:54.362+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦