Skip to content
TheChatArchiveThe Chat Archive
Coherecommand-a-03-2025· CohereHugging Face LMArena Human Preference 140K

Guess number game in scratch

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with DeepSeekdeepseek-v3-0324’s answer.
  1. User

    Guess number game in scratch

  2. Cohere Assistant

    Below is a simple Guess the Number Game designed in Scratch. This project is beginner-friendly and teaches basic concepts like variables, loops, and conditional statements.


    Scratch Project: Guess the Number Game

    Objective:

    The player tries to guess a randomly generated number between 1 and 100. The game provides hints ("Too high!" or "Too low!") until the player guesses correctly.


    Step-by-Step Guide

    Sprites:

    • Sprite 1: A cat (default) for user interaction.
    • Sprite 2: A "Number Guesser" sprite (optional, for visual feedback).

    Backdrop:

    A simple background with the title "Guess the Number!"


    Scratch Code

    Stage Scripts:

    when green flag clicked  
      hide  
      delete all of [guesses v]  
      set [secret number v] to (pick random (1) to (100))  
      say [Let's play! Guess a number between 1 and 100.] for (2) seconds  
      show  
    

    Sprite 1 (Cat) Scripts:

    when I receive [start game v]  
      set [guesses v] to (0)  
      forever  
        wait for [guess v]  
        change [guesses v] by (1)  
        if <(guess) = (secret number)> then  
          say [Correct! The number was (secret number). You won in (guesses) guesses!] for (5) seconds  
          stop [this script v]  
        else  
          if <(guess) > (secret number)> then  
            say [Too high! Try again.] for (2) seconds  
          else  
            say [Too low! Try again.] for (2) seconds  
          end  
        end  
      end  
    

    User Input:

    Add a text input for the player to enter their guess:

    when green flag clicked  
      ask [Enter your guess:] and wait  
      broadcast [guess v]  
    

    How to Play

    1. Click the green flag to start.
    2. Enter a number between 1 and 100 when prompted.
    3. The cat will respond with hints until you guess correctly.
    4. Win and see your total guesses!

    Enhancements (Optional):

    1. Limit Guesses: Add a counter for max attempts (e.g., 10 tries).
    2. Score System: Track fastest wins or fewest guesses.
    3. Visual Feedback: Use a thermometer sprite to show "hot" or "cold" hints.

    Scratch Project Link Template:
    Guess the Number Game

    Let me know if you'd like help publishing or adding features! 🎮

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.