Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

python Help Answer two of the following questions for full credit for this assig

ID: 3834243 • Letter: P

Question

python Help

Answer two of the following questions for full credit for this assignment. Your solution shoud be between fifty and one hundred words. Place your questions in the “Answer” section below. Be certain to number your answers with the same number that is associated with the question.

1- Why would you typically load an image for a Sprite object with transparency on?

2- How can you place a Sprite object in the middle of the graphics screen without knowing the screen dimensions?

3- How is a Message object different from a Text object?

4- How does the screen object’s fps property affect the speed of moving sprites?

5- What happens to graphics objects during the screen object's mainloop() method?

Explanation / Answer

1. A sprite is a rectangular shaped entity having a texture. A texture is an image which is mapped to a 2D entity. Sprites are used in web design as a way to improve performance by combining numerous small images or icons into a larger image called a sprite sheet or tile set.

Transparent images are useful when you are not certain of the background color on which your image will be displayed.With binary transparency, one color from the indexed color palette is marked as the transparent color.

When the transperency is on, fine tuning of the image is possible as the background is clear and the image can be placed in the entity clearly.So loading an image for a spite object is preferable with transpercy on.

3. Message objects provide a mapping style interface for accessing the message headers, and an explicit interface for accessing both the headers and the payload. It provides convenience methods for generating a flat text representation of the message object tree, for accessing commonly used header parameters, and for recursively walking over the object tree.

Here are the methods of the Message class:

class email.message.Message

label = Text(Point(100, 120), 'A face')
label.draw(win)
The code above illustrates how a Text object is used to place text on the window. The parameters to construct the Text object are the point at the center of the text, and the text string itself.