WorksheetsCâu hỏi về Scratch
Total questions: 51
Worksheet time: 26mins
Khối lệnh nào để bắt đầu chạy script khi nhấn cờ xanh?
when [space] key pressed
when flag clicked
forever
repeat
Khối nào giúp sprite di chuyển 10 bước?
go to x: y:
move (10) steps
glide 1 secs to x: y:
wait 1 sec
Để sprite quay sang phải 15 độ, dùng lệnh nào?
turn right (15) degrees
turn counterclockwise (15)
point in direction (90)
point towards [mouse pointer]
Khối nào để nhân vật nhảy lên cao?
change y by (50)
change x by (50)
hide
say [Hello] for 2 secs
Khối nào để nhân vật nói lời thoại?
say [Hello] for 2 secs
think [Hmm...]
broadcast [start]
when flag clicked
Để sprite biến mất, ta dùng:
hide
show
delete this clone
switch backdrop
Khối nào để sprite xuất hiện trở lại?
hide
show
switch costume
go to front layer
Lệnh nào thay đổi nền sân khấu?
switch backdrop to [x]
switch costume to [x]
go to [x]
next costume
Lệnh nào dùng để dừng tất cả âm thanh?
stop all sounds
stop sound [music]
stop all
hide
Để phát nhạc nền trong Scratch:
start sound [music]
play sound [music] until done
Cả A và B
stop all sounds
Lệnh nào giúp sprite đi đến chuột?
go to [mouse pointer]
point towards [mouse pointer]
move 10 steps
repeat until
Để sprite lặp mãi mãi, dùng:
forever
repeat 10
repeat until
wait
Để sprite lặp 10 lần, dùng:
repeat (10)
forever
wait
broadcast
Lệnh nào để kiểm tra nếu sprite chạm vào cạnh màn hình?
if on edge, bounce
touching [edge]
point in direction
go to random position
Lệnh nào giúp sprite quay mặt sang trái/phải mà không lộn ngược?
set rotation style [left-right]
turn 15 degrees
point towards
glide
Lệnh nào để sprite chờ 1 giây?
wait (1) secs
repeat (1)
stop all
hide
Muốn sprite đến vị trí chính xác, dùng:
go to x: (100) y: (50)
move 10 steps
glide 1 sec to random position
show
Muốn sprite chạy tới vị trí trong 2 giây, dùng:
glide (2) secs to x: y:
go to x: y:
move 20 steps
point towards
Để tạo biến đếm điểm, ta cần:
Tạo biến [Score]
show variable [Score]
change [Score] by (1)
Cả A, B, C
Để tạo biến đếm điểm, ta cần:
Tạo biến [Score]
show variable [Score]
change [Score] by (1)
Cả A, B, C
Lệnh nào để hiển thị biến?
show variable [x]
hide variable [x]
switch costume
say [score]
Để reset biến về 0, dùng:
set [Score] to (0)
change [Score] by (0)
hide variable [Score]
stop all
Khi muốn tạo nhiều đối tượng giống nhau, dùng:
create clone of [myself]
duplicate sprite
switch costume
forever
Để clone chạy, cần script nào?
when I start as a clone
when flag clicked
forever
broadcast
Muốn xóa clone sau khi xong việc:
delete this clone
hide
stop all
switch backdrop
Nếu muốn gửi tín hiệu cho sprite khác, dùng:
broadcast [message]
say [message]
point towards
show
Muốn chờ nhận tín hiệu xong mới tiếp tục:
broadcast [message] and wait
broadcast [message]
say [message]
stop all
Để kiểm tra phím được nhấn:
key [space] pressed?
mouse down?
touching?
wait until
Để kiểm tra chuột có nhấn không:
mouse down?
key pressed?
touching?
broadcast
Muốn sprite theo dõi chuột liên tục:
forever → go to [mouse pointer]
go to [mouse pointer]
repeat 10
hide
Để tạo thời gian đếm ngược, ta dùng:
set [time] to (60) + repeat until [time=0] → change [time] by (-1)
wait
hide variable
stop all
Nếu muốn game dừng lại khi score=10, dùng:
if then stop all
wait until [Score=10]
repeat until [Score=10]
Cả A và B
Muốn sprite đổi trang phục:
switch costume to [costume2]
switch backdrop to [costume2]
change size
hide
Để sprite tự động thay đổi costume liên tục:
forever → next costume → wait (0.1) secs
switch backdrop
repeat until
hide
Muốn sprite nhấp nháy màu sắc:
change color effect by (25)
switch costume
show variable
stop all
Để sprite lớn gấp đôi:
set size to (200)%
change size by (200)
repeat (2)
go to front layer
Muốn sprite đi tới vị trí ngẫu nhiên:
go to random position
go to mouse pointer
glide
repeat
Khối nào để kiểm tra sprite có chạm màu?
touching color [ ]?
touching [sprite]?
key
sprite đi tới vị trí ngẫu nhiên:
go to random position
go to mouse pointer
glide
repeat
Khối nào để kiểm tra sprite có chạm màu?
touching color [ ]?
touching [sprite]?
key pressed?
broadcast
Để sprite phát nhạc nền liên tục:
forever → start sound [music]
start sound
broadcast
repeat
Nếu muốn sprite nói tên người chơi nhập vào, dùng:
ask [Tên bạn là gì?] and wait + say (answer)
say [Tên bạn là gì?]
switch backdrop
stop all
Muốn sprite lưu điểm cao nhất, ta dùng:
Biến [Highscore]
set [Highscore] to (Score) khi Score > Highscore
Cả A và B
stop all
Để giới hạn sprite trong khung hình x=-200…200, y=-150…150:
if x>200 set x=200 và if x<-200 set x=-200 …
forever → go to [0,0]
stop all
switch backdrop
Nếu muốn clone tự hủy sau 5 giây, code hợp lý là:
wait (5) secs → delete this clone
stop all
hide
forever
Khi nhiều clone chạy cùng lúc, Scratch xử lý theo cách nào?
Song song, độc lập
Tuần tự từng clone
Dừng clone cũ khi clone mới xuất hiện
Chỉ giữ lại clone đầu tiên
Muốn tính tốc độ di chuyển sprite, ta có thể:
Tính quãng đường / thời gian bằng biến
forever
hide
repeat
Nếu muốn boss xuất hiện mỗi 10 giây, code đúng là:
forever → wait (10) secs → show
repeat 10
stop all
hide
Muốn tạo 3 loại bullets khác nhau, ta dùng:
Nhiều costume và switch costume to (pick random)
switch backdrop
repeat
stop all
Nếu muốn wukong tăng tốc sau 30 giây chơi, code đúng là:
wait (30) secs → change speed by (2)
forever
hide
switch backdrop
Muốn lập trình chế độ "bất tử 5 giây" sau khi trúng đòn, ta cần:
Biến trạng thái (Invincible = 1) + wait (5) secs rồi set Invincible=0
Block trạng thái (Invincible = 1) + wait (5) secs rồi set Invincible=0
Sử dụng lệnh hide sau 5s thì bật show lại
Delete all sau 5s sẽ tạo lại
