{"id":694875,"student_id":10,"content":"from game import *\nfrom random import random\n\narr = []\nratio = 1.01\nspace = 1.01 ** 20\nreset = space ** 15\ncenter_x = 600\ncenter_y = 200\nclock = 0\n\nset_backdrop('lightblue')\n\nplayer = create_sprite('player.png')\nplayer.y = 800\nplayer.layer = 10000\nplayer.scale = 1.5\n\nfor y in range(15):\n for x in range(20):\n s = create_sprite('0.png', '1.png', '2.png')\n s.scale /= space ** y\n s.y = center_y + 600 * s.scale\n s.x = center_x + ((x - 10) * 400) * s.scale\n s.layer = -y\n arr.append(s)\n \n if x == 4 or x == 15:\n s.costume_id = 1\n \ndef loop():\n global clock\n clock += 1\n \n if clock % 10 == 0:\n player.y = 810\n else:\n player.y = 790\n \n for s in arr:\n s.layer = s.y\n dx = s.x - center_x\n dy = s.y - center_y\n \n s.x = dx * ratio + center_x\n s.y = dy * ratio + center_y\n \n s.scale *= ratio\n if s.y \u003e 1200:\n s.scale /= reset\n s.x = (dx / reset) + center_x\n s.y = (dy / reset) + center_y\n s.direction = random() * 30 - 15 + 90\n \n if s.costume_id != 1:\n s.costume_id = 2 if random() \u003c 0.1 else 0\n \n if key.left and arr[4].x \u003c 600: s.x += s.scale * 30\n if key.right and arr[15].x \u003e 600: s.x -= s.scale * 30\n if s.x \u003e 500 and s.x \u003c 700 and s.y \u003e 700 and s.costume_id == 2:\n stop()\n \n \nforever(loop)\n","created_at":"2024-02-15T11:35:37.017+08:00","updated_at":"2024-05-16T15:47:32.275+08:00","name":"kutar 開車車","language":"python","screenshot":{"url":"/uploads/project/screenshot/694875/df9032327aa02d328c00c6cb881b81ca.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":263,"hashid":"d5msnzwp6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":15923575,"file_name":"1.png","project_id":694875,"asset_id":726493,"created_at":"2024-03-14T17:37:46.518+08:00","updated_at":"2024-03-14T17:37:46.518+08:00"},{"id":15923574,"file_name":"0.png","project_id":694875,"asset_id":726492,"created_at":"2024-03-14T17:37:46.140+08:00","updated_at":"2024-03-14T17:37:46.140+08:00"},{"id":15923576,"file_name":"2.png","project_id":694875,"asset_id":726494,"created_at":"2024-03-14T17:46:29.338+08:00","updated_at":"2024-03-14T17:46:29.338+08:00"},{"id":15923578,"file_name":"player.png","project_id":694875,"asset_id":726496,"created_at":"2024-03-14T18:39:00.340+08:00","updated_at":"2024-03-14T18:39:00.340+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Screenshot
繁中
简中
English
日本語
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer