
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
10 questions
五年级 设计与工艺 16.6.2021

Quiz
•
5th Grade
10 questions
6年级信息与通讯技能

Quiz
•
6th Grade
14 questions
网络与通讯2

Quiz
•
10th Grade - University
10 questions
【2】 Ms Excel 基础 - Chart S3ADY

Quiz
•
9th - 12th Grade
10 questions
9 сынып Pygame

Quiz
•
8th Grade
10 questions
形似字

Quiz
•
1st - 10th Grade
15 questions
网络与通讯

Quiz
•
12th Grade
18 questions
G4_1st semester final Revision 期末复习

Quiz
•
4th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

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

Interactive video
•
6th - 10th Grade
8 questions
Time Management

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
12 questions
3-5 Digital Citizenship: Appropriate Use

Quiz
•
3rd - 5th Grade
11 questions
Spanish - English Cognates 4th

Quiz
•
4th - 5th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade