
python4-lesson04
Quiz
•
Computers
•
4th - 12th Grade
•
Practice Problem
•
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
20 questions
以伪代码与流程图表示算法
Quiz
•
4th - 5th Grade
10 questions
11302_04_程式概念(01)
Quiz
•
7th Grade
10 questions
台中市三年級資訊2-01瀏覽器的使用-01悠遊地球村
Quiz
•
3rd - 4th Grade
11 questions
和平精英
Quiz
•
1st - 12th Grade
10 questions
常識 4B冊 第六課 網絡通訊與安全
Quiz
•
4th Grade
20 questions
六年级信息与通信技术
Quiz
•
6th Grade
10 questions
數位時代
Quiz
•
9th Grade
20 questions
108期末資訊教育段考
Quiz
•
7th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Company Logos
Quiz
•
6th - 8th Grade
13 questions
PowerPoint Basics
Quiz
•
6th - 8th Grade
10 questions
App Creators Lesson 2.1-2.4
Quiz
•
8th Grade
10 questions
Exploring Computer Science Careers and Subfields
Interactive video
•
6th - 10th Grade
15 questions
AP CSP Unit 4
Quiz
•
10th - 12th Grade
45 questions
Cybersecurity Quiz
Quiz
•
12th Grade
23 questions
Prog 1 Python Q1 Practice
Quiz
•
9th - 12th Grade
