Number 1: Initializing pygame
Initializing pygame allows you to do many of the functions that pygame has. It should be in every pygame program you do.
import pygame
from pygame.locals import *
pygame.init()
It does nothing, but when you start writing games with pygame, you will need it.
Number 2: Creating a Screen
This is a very simple thing. But, there are some things that you have to know for it to work.
1. If you create a screen without assigning the screen to a variable, you won't be able to do anything to the screen.
2. The functions in pygame have a certain number of parameters, so when you are creating a screen, you will see that there are double parentheses. This is because you have to put multiple values into a single parameter.
Example without number 1:
import pygame
from pygame.locals import *
pygame.init()
pygame.display.set_mode((640, 480))
No variable is assigned to the screen, so you won't be able to manipulate the screen.
Example without number 2:
import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode(640, 480)
This example will bring the error of: error: the function pygame.display.set_mode() takes only one parameter, given two.
This is because to store two values into a single variable, you need parentheses, so its the function(and the variable()).