
python4-lesson04

Quiz
•
Computers
•
4th - 12th Grade
•
Medium

hang zheng
Used 11+ times
FREE Resource
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
Similar Resources on Wayground
20 questions
UH Pygame - Vol. 1

Quiz
•
9th - 12th Grade
11 questions
python4-lesson02

Quiz
•
4th - 12th Grade
10 questions
CyberSecurity Training - Quiz1

Quiz
•
1st - 5th Grade
10 questions
python4-lesson06

Quiz
•
2nd - 12th Grade
20 questions
111學年度-資訊科技對我們的影響

Quiz
•
7th Grade
20 questions
六年級程式設計測驗

Quiz
•
6th Grade
10 questions
六年级 错别字

Quiz
•
4th - 6th Grade
10 questions
顺序结构复习

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
typing

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade