-3
我想指望每次我打的左鍵我的代碼看起來像這樣我每次按下某個鍵時如何計算?
import pyautogui
import pygame
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
print (sequentially the amount of times i've hit left)
遞增變量 – Milk
遞增變量並打印該變量。 –
所以像x = 1和比打印x + = 1?那是對的嗎? – Asori12