Япишу игру на языке питон и мне выдает ошибку вот код и ошибка
import pygame
pygame.init()
win = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("cubes game")
x = 50
y = 500
width = 40
height = 60
speed = 5
isjump = false
jumpcount = 10
run = true
while run:
pygame.time.delay(50)
for event in pygame.event.get():
if event.type == pygame.quit:
run = false
keys = pygame.key.get_pressed()
if keys[pygame.k_left] and x > 5:
x -= speed
if keys[pygame.k_right] and x < 1000 - width - 5:
x += speed
if not(isjump):
if keys[pygame.k_up] and y > 5:
y -= speed
if keys[pygame.k_down] and y < 600 - height - 5:
y += speed
if keys[pygame.k_space]:
isjump = true
else:
if jumpcount > = -10:
if jumpcount < 0:
y += (jumpcount ** 2) / 2
else:
y -= (jumpcount ** 2) / 2
jumpcount -= 1
else:
isjump = false
jumpcount = 10
win.fill((0,0,0))
pygame.draw.rect(win, (0,0,255), (x, y, width ,height))
pygame.display.update()
pygame.quit()
вот ошибка
file "c: \python\game.py", line 41
y -= (jumpcount ** 2)
^
taberror: inconsistent use of tabs and spaces in indentation
225
275
Ответы на вопрос:
1. відкрийте програму tux paint 2. знайдіть кнопку "штампи" у верхньому лівому кутку 3. виберіть вподобаний штамп 4. відрегулюйте розмір в нижньому правому кутку 6. натисніть на фон 7. малюнок готовий
Популярно: Информатика
-
PEWALWIK21.01.2021 03:59
-
Miku111106.08.2022 05:15
-
rwessi122310.11.2021 03:06
-
Ekaaaterina05.01.2021 17:46
-
КамбэкBTS25.05.2023 02:55
-
Чика1без2ника30.03.2023 19:07
-
violettakot0102.04.2021 13:44
-
Jack170308.12.2020 23:34
-
Lero4ka22222.09.2020 19:17
-
Olegafrey08.06.2022 14:07