
python4-lesson04
Quiz
•
Computers
•
4th - 12th Grade
•
Medium
hang zheng
Used 11+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
编写一个游戏,第一行代码应该是?
pygame.init()
import pygame
import setting
import sprites
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
已知起点坐标是(0,0),终点坐标是(100,100),现在想在起点和终点之间画一条红色的线,下列代码正确的是?
pg.draw.line(self.screen,(255,0,0),(0,0),(100,100))
pg.draw.line(self.screen,(255,255,0),(0,0),(100,100))
pg.draw.line(self.screen,(255,0,0),(100,100),(100,100))
pg.draw.line(self.screen,(255,255,0),(100,0),(0,100))
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
keys=pg.key.get_pressed()
返回的是一个元组,如果这个元组中的元素全部都是0,则表示?
此时键盘上的每一个按键都被按下了
键盘失灵了
此时键盘上有些键被按下,有些键没被按下
此时键盘上所有的按键都没有被按下
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
keys=pygame.key.get_pressed()
当电脑玩家按下了w键,那么keys中的哪个元素会发生变化,变成多少?
keys[pygame.K_w] 变成0
keys[pygame.K_w] 变成1
keys[pygame.K_UP] 变成0
keys[pygame.K_UP] 变成1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
今天学习的游戏编程中,setting.py这个文件的主要作用是?
进行游戏参数的设置(屏幕宽度高度,颜色),给主程序使用
编写主程序的地方
编写各个角色类的地方
嗯?我们今天有写过这个文件吗?
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
pygame中的游戏退出事件是?
pygame.exit()
pygame.KEYUP
pygame.QUIT()
pygame.QUIT
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
今天我们在Game类中编写了一个new()方法,用来创建各种角色类的实例,请问这个new方法在整个游戏程序中需要执行几次?
每一帧都要执行
每一秒都要执行
只执行1次
不需要执行
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
gimp 操作試題
Quiz
•
7th Grade
10 questions
113-1 開始上電腦課
Quiz
•
5th Grade
10 questions
資訊安全
Quiz
•
7th Grade
10 questions
Scratch基礎測驗01
Quiz
•
3rd - 6th Grade
10 questions
11301_電腦教室使用規範
Quiz
•
7th Grade
11 questions
Python1 pygame fin
Quiz
•
7th - 11th Grade
10 questions
Internet Test 1
Quiz
•
4th Grade
15 questions
110資安素養自我評量-中年級-1.我的帳密是秘密?
Quiz
•
3rd - 4th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
