79704301

Date: 2025-07-17 05:02:01
Score: 0.5
Natty:
Report link

import time

import random

def game():

print("🏃‍♂️ Welcome to the Text-Based Jump Game!")

print("Type 'jump' when you see an obstacle!\\n")

score = 0

for i in range(1, 11):

    time.sleep(1)

    obstacle = random.choice(\[True, False\])

    

    if obstacle:

        print(f"Obstacle {i} ahead! Type 'jump': ", end='')

        action = input().strip().lower()

        if action == "jump":

            print("✅ You jumped over it!\\n")

            score += 1

        else:

            print("❌ You hit the obstacle!\\n")

    else:

        print(f"No obstacle {i}. Keep running!\\n")

        score += 1

print(f"🏁 Game over! Your final scocoin = pygame.Rect(300, 310, 20, 20)

# In the draw section:

pygame.draw.rect(screen, (255, 215, 0), coin) # Gold color

# Collision check:

if player.colliderect(coin):

print("Coin collected!")re: {score}/10")

game()

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Nanni