-1
import #pygame
from PYGAME.locals import *
from RECT import *

pygame.init()

#Make Screen
screen = pygame.display.set_mode((640,240))

#Defining the colors
BLACK = (0,0,0)
GRAY = (127,127,127)
WHITE = (255,255,255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
CYAN = (0, 255, 255)
MAGENTA = (255, 0, 255)

#Defining a function
def draw_point(text,pos):
    img = font.render(text,True,BLACK)
    pygame.draw.circle(screen,RED,pos,3)
    screen.blit(img,pos)

I am unable to import the RECT class in the third line. It's my first time posting a doubt online so thanks for helping out. Due to this, I am unable to define the draw_point function.

Red
  • 26,798
  • 7
  • 36
  • 58

1 Answers1

0

Your code doesn't use RECT, so I can only guess at what you're trying to import.

import pygame
from pygame.locals import *
from pygame import rect, Rect #one of these is probably what you want
CircuitSacul
  • 1,594
  • 12
  • 32