How To Code A Rock Paper Scissors Game In Python: A Step-By-Step Guide?

Are you eager to learn How To Code A Rock Paper Scissors Game In Python? Rockscapes.net provides an amazing guide to crafting your own interactive game and improving your Python programming skills. With our assistance, you will effortlessly learn how to make a rock, paper, scissors game in Python.

Rock paper scissors is a fantastic project for beginners. Our thorough guide will teach you how to use input(), while loops, Enum, and dictionaries to build a fun and engaging game. You will also learn about game development, basic Python concepts, and practical coding skills, ensuring you gain valuable knowledge for your programming journey.

1. What Is Rock Paper Scissors and Why Code It in Python?

Rock paper scissors is a classic hand game played worldwide. Its simplicity makes it an excellent starting point for learning programming concepts. Here’s why coding it in Python is a great idea:

  • Simple Rules: Rock crushes scissors, paper covers rock, and scissors cut paper. The rules are straightforward, making it easy to translate into code.
  • Great for Beginners: It introduces fundamental programming concepts like user input, loops, and conditional statements.
  • Fun and Engaging: Building a game is more engaging than typical coding exercises, keeping you motivated.
  • Versatile Learning: You’ll learn to use input() for user interaction, while loops for repeated gameplay, Enum for clean code, and dictionaries for complex rules.

This project is perfect for anyone looking to dive into Python game development. Let’s begin your journey with Rockscapes.net.

2. Setting Up Your Python Environment for Rock Paper Scissors

Before you begin coding, ensure you have Python installed on your system. You can download the latest version from the official Python website. Follow these steps to set up your environment:

  1. Install Python: Download and install Python from python.org.
  2. Verify Installation: Open your terminal or command prompt and type python --version or python3 --version. This confirms Python is correctly installed.
  3. Choose an IDE: Select a suitable Integrated Development Environment (IDE). Popular choices include Visual Studio Code, PyCharm, and Jupyter Notebook.
  4. Create a Project Directory: Create a new folder for your rock paper scissors game.
  5. Create a Python File: Inside the project directory, create a new file named rock_paper_scissors.py.

Now you are ready to start coding your rock paper scissors game in Python with Rockscapes.net.

3. Coding a Single Game of Rock Paper Scissors in Python

Let’s start by coding a single round of rock paper scissors. This involves taking user input, having the computer choose an action, and determining the winner.

3.1. Importing the random Module

To begin, import the random module. This module will help the computer make random choices:

import random

The random module provides functions for generating random numbers, which we’ll use to simulate the computer’s choices. This ensures the game is unpredictable and fair.

3.2. Taking User Input with input()

Next, take input from the user using the input() function:

user_action = input("Enter a choice (rock, paper, scissors): ")

This line prompts the user to enter their choice and stores it in the user_action variable. The user can type “rock”, “paper”, or “scissors”.

3.3. Making the Computer Choose

To make the computer choose its action, use the random.choice() function:

possible_actions = ["rock", "paper", "scissors"]
computer_action = random.choice(possible_actions)
print(f"nYou chose {user_action}, computer chose {computer_action}.n")

This code defines a list of possible actions and then randomly selects one for the computer. The random.choice() function ensures each action has an equal chance of being chosen.

3.4. Determining a Winner

Now, determine the winner by comparing the user’s choice with the computer’s choice:

if user_action == computer_action:
    print(f"Both players selected {user_action}. It's a tie!")
elif user_action == "rock":
    if computer_action == "scissors":
        print("Rock smashes scissors! You win!")
    else:
        print("Paper covers rock! You lose.")
elif user_action == "paper":
    if computer_action == "rock":
        print("Paper covers rock! You win!")
    else:
        print("Scissors cuts paper! You lose.")
elif user_action == "scissors":
    if computer_action == "paper":
        print("Scissors cuts paper! You win!")
    else:
        print("Rock smashes scissors! You lose.")

This block of code checks for all possible outcomes and prints the appropriate message. It first checks for a tie and then determines the winner based on the rules of rock paper scissors.

3.5. Complete Code for a Single Game

Here is the complete code for a single game:

import random

user_action = input("Enter a choice (rock, paper, scissors): ")
possible_actions = ["rock", "paper", "scissors"]
computer_action = random.choice(possible_actions)
print(f"nYou chose {user_action}, computer chose {computer_action}.n")

if user_action == computer_action:
    print(f"Both players selected {user_action}. It's a tie!")
elif user_action == "rock":
    if computer_action == "scissors":
        print("Rock smashes scissors! You win!")
    else:
        print("Paper covers rock! You lose.")
elif user_action == "paper":
    if computer_action == "rock":
        print("Paper covers rock! You win!")
    else:
        print("Scissors cuts paper! You lose.")
elif user_action == "scissors":
    if computer_action == "paper":
        print("Scissors cuts paper! You win!")
    else:
        print("Rock smashes scissors! You lose.")

This code allows you to play one round of rock paper scissors. However, to make the game more engaging, you’ll want to allow players to play multiple rounds.

4. Playing Several Games in a Row Using Loops

To allow the game to be played multiple times, you can use a while loop. This loop will continue to run until the user decides to quit.

4.1. Implementing a while Loop

Wrap the game logic inside a while True loop:

import random

while True:
    user_action = input("Enter a choice (rock, paper, scissors): ")
    possible_actions = ["rock", "paper", "scissors"]
    computer_action = random.choice(possible_actions)
    print(f"nYou chose {user_action}, computer chose {computer_action}.n")

    if user_action == computer_action:
        print(f"Both players selected {user_action}. It's a tie!")
    elif user_action == "rock":
        if computer_action == "scissors":
            print("Rock smashes scissors! You win!")
        else:
            print("Paper covers rock! You lose.")
    elif user_action == "paper":
        if computer_action == "rock":
            print("Paper covers rock! You win!")
        else:
            print("Scissors cuts paper! You lose.")
    elif user_action == "scissors":
        if computer_action == "paper":
            print("Scissors cuts paper! You win!")
        else:
            print("Rock smashes scissors! You lose.")

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

The while True loop makes the game run indefinitely until the user chooses to stop. The break statement exits the loop when the user enters anything other than “y”.

4.2. Adding a Play Again Option

To allow the user to play again, add an input prompt at the end of the loop:

play_again = input("Play again? (y/n): ")
if play_again.lower() != "y":
    break

This code asks the user if they want to play again. If the user enters anything other than “y” (case-insensitive), the loop breaks and the game ends.

4.3. Handling User Input Errors

To make the game more robust, handle potential input errors. For example, the user might enter an invalid choice. Add a check to ensure the user’s input is valid:

while True:
    user_action = input("Enter a choice (rock, paper, scissors): ").lower()
    possible_actions = ["rock", "paper", "scissors"]

    if user_action not in possible_actions:
        print("Invalid input. Please enter rock, paper, or scissors.")
        continue

    computer_action = random.choice(possible_actions)
    print(f"nYou chose {user_action}, computer chose {computer_action}.n")

    if user_action == computer_action:
        print(f"Both players selected {user_action}. It's a tie!")
    elif user_action == "rock":
        if computer_action == "scissors":
            print("Rock smashes scissors! You win!")
        else:
            print("Paper covers rock! You lose.")
    elif user_action == "paper":
        if computer_action == "rock":
            print("Paper covers rock! You win!")
        else:
            print("Scissors cuts paper! You lose.")
    elif user_action == "scissors":
        if computer_action == "paper":
            print("Scissors cuts paper! You win!")
        else:
            print("Rock smashes scissors! You lose.")

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

This updated code converts the user’s input to lowercase and checks if it is in the list of possible actions. If not, it prints an error message and continues to the next iteration of the loop.

5. Cleaning Up Your Code with enum.IntEnum

To improve the readability and maintainability of your code, you can use enum.IntEnum. This allows you to define a set of named integer constants.

5.1. Importing IntEnum

First, import IntEnum from the enum module:

from enum import IntEnum

This imports the IntEnum class, which you’ll use to define your actions.

5.2. Defining Actions with IntEnum

Define an Action class using IntEnum:

class Action(IntEnum):
    Rock = 0
    Paper = 1
    Scissors = 2

This creates an Action class with three possible values: Rock, Paper, and Scissors. Each value is assigned an integer constant.

5.3. Using IntEnum in Your Code

Update your code to use the Action enum:

import random
from enum import IntEnum

class Action(IntEnum):
    Rock = 0
    Paper = 1
    Scissors = 2

while True:
    try:
        user_action = int(input("Enter a choice (rock[0], paper[1], scissors[2]): "))
        user_action = Action(user_action)
    except ValueError:
        print("Invalid input. Please enter 0, 1, or 2.")
        continue

    computer_action = random.choice(list(Action))
    print(f"nYou chose {user_action.name}, computer chose {computer_action.name}.n")

    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif user_action == Action.Rock:
        if computer_action == Action.Scissors:
            print("Rock smashes scissors! You win!")
        else:
            print("Paper covers rock! You lose.")
    elif user_action == Action.Paper:
        if computer_action == Action.Rock:
            print("Paper covers rock! You win!")
        else:
            print("Scissors cuts paper! You lose.")
    elif user_action == Action.Scissors:
        if computer_action == Action.Paper:
            print("Scissors cuts paper! You win!")
        else:
            print("Rock smashes scissors! You lose.")

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

This updated code uses the Action enum to represent the possible actions. The user now enters a number corresponding to their choice.

6. Structuring Your Code with Functions

To further organize your code, you can split it into functions. Each function will handle a specific task, such as getting user input, making the computer choose, and determining the winner.

6.1. Defining Functions

Define functions for each part of the game:

import random
from enum import IntEnum

class Action(IntEnum):
    Rock = 0
    Paper = 1
    Scissors = 2

def get_user_selection():
    while True:
        try:
            user_action = int(input("Enter a choice (rock[0], paper[1], scissors[2]): "))
            return Action(user_action)
        except ValueError:
            print("Invalid input. Please enter 0, 1, or 2.")

def get_computer_selection():
    return random.choice(list(Action))

def determine_winner(user_action, computer_action):
    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif user_action == Action.Rock:
        if computer_action == Action.Scissors:
            print("Rock smashes scissors! You win!")
        else:
            print("Paper covers rock! You lose.")
    elif user_action == Action.Paper:
        if computer_action == Action.Rock:
            print("Paper covers rock! You win!")
        else:
            print("Scissors cuts paper! You lose.")
    elif user_action == Action.Scissors:
        if computer_action == Action.Paper:
            print("Scissors cuts paper! You win!")
        else:
            print("Rock smashes scissors! You lose.")

while True:
    user_action = get_user_selection()
    computer_action = get_computer_selection()
    print(f"nYou chose {user_action.name}, computer chose {computer_action.name}.n")

    determine_winner(user_action, computer_action)

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

This code defines three functions: get_user_selection(), get_computer_selection(), and determine_winner(). Each function handles a specific part of the game logic.

6.2. Calling Functions in the Main Loop

Call the functions in the main loop to play the game:

while True:
    user_action = get_user_selection()
    computer_action = get_computer_selection()
    print(f"nYou chose {user_action.name}, computer chose {computer_action.name}.n")

    determine_winner(user_action, computer_action)

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

This loop calls the functions to get the user’s choice, the computer’s choice, and determine the winner. This makes the code more readable and easier to maintain.

7. Adding More Complex Rules with Dictionaries

To make the game more interesting, you can add more complex rules. For example, you can add Lizard and Spock as possible actions. To handle these complex rules, you can use dictionaries.

7.1. Defining a victories Dictionary

Define a victories dictionary that specifies which actions each action beats:

import random
from enum import IntEnum

class Action(IntEnum):
    Rock = 0
    Paper = 1
    Scissors = 2
    Lizard = 3
    Spock = 4

victories = {
    Action.Scissors: [Action.Lizard, Action.Paper],
    Action.Paper: [Action.Spock, Action.Rock],
    Action.Rock: [Action.Lizard, Action.Scissors],
    Action.Lizard: [Action.Spock, Action.Paper],
    Action.Spock: [Action.Scissors, Action.Rock]
}

def get_user_selection():
    while True:
        try:
            user_action = int(input("Enter a choice (rock[0], paper[1], scissors[2], lizard[3], spock[4]): "))
            return Action(user_action)
        except ValueError:
            print("Invalid input. Please enter 0, 1, 2, 3, or 4.")

def get_computer_selection():
    return random.choice(list(Action))

def determine_winner(user_action, computer_action):
    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif computer_action in victories[user_action]:
        print(f"{user_action.name} beats {computer_action.name}! You win!")
    else:
        print(f"{computer_action.name} beats {user_action.name}! You lose.")

while True:
    user_action = get_user_selection()
    computer_action = get_computer_selection()
    print(f"nYou chose {user_action.name}, computer chose {computer_action.name}.n")

    determine_winner(user_action, computer_action)

    play_again = input("Play again? (y/n): ")
    if play_again.lower() != "y":
        break

This code adds Lizard and Spock to the Action enum and defines the victories dictionary. The victories dictionary specifies which actions each action beats.

7.2. Updating the determine_winner Function

Update the determine_winner function to use the victories dictionary:

def determine_winner(user_action, computer_action):
    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif computer_action in victories[user_action]:
        print(f"{user_action.name} beats {computer_action.name}! You win!")
    else:
        print(f"{computer_action.name} beats {user_action.name}! You lose.")

This updated function checks if the computer’s action is in the list of actions that the user’s action beats. If it is, the user wins. Otherwise, the computer wins.

8. Enhancing the User Interface

To make the game more user-friendly, you can enhance the user interface. This includes providing clear instructions, displaying the choices, and showing the results in a more appealing way.

8.1. Displaying Choices

Display the available choices to the user:

def get_user_selection():
    while True:
        try:
            choices = [f"{action.name}[{action.value}]" for action in Action]
            choices_str = ", ".join(choices)
            user_action = int(input(f"Enter a choice ({choices_str}): "))
            return Action(user_action)
        except ValueError:
            print("Invalid input. Please enter a valid number.")

This updated function displays the available choices to the user, making it easier for them to make a selection.

8.2. Adding Visual Elements

You can add visual elements to the game, such as ASCII art or emojis, to make it more engaging. For example:

rock_art = """
    _______
---'   ____)
      (_____)
      (_____)
      (____)
---.__(___)
"""

paper_art = """
    _______
---'   ____)____
          ______)
          _______)
         _______)
---.__________)
"""

scissors_art = """
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
"""

lizard_art = """
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
"""

spock_art = """
    _______
---'   ____)____
          ______)
       __________)
      (____)
---.__(___)
"""

action_art = {
    Action.Rock: rock_art,
    Action.Paper: paper_art,
    Action.Scissors: scissors_art,
    Action.Lizard: lizard_art,
    Action.Spock: spock_art
}

def determine_winner(user_action, computer_action):
    print(f"nYou chose:n{action_art[user_action]}")
    print(f"Computer chose:n{action_art[computer_action]}")

    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif computer_action in victories[user_action]:
        print(f"{user_action.name} beats {computer_action.name}! You win!")
    else:
        print(f"{computer_action.name} beats {user_action.name}! You lose.")

This code adds ASCII art for each action and displays it when the user and computer make their choices.

8.3. Improving the Output

Improve the output by adding colors and formatting to make it more visually appealing. You can use libraries like colorama to add colors to the output:

import colorama
from colorama import Fore, Style

colorama.init()

def determine_winner(user_action, computer_action):
    print(f"nYou chose:n{Fore.GREEN}{action_art[user_action]}{Style.RESET_ALL}")
    print(f"Computer chose:n{Fore.RED}{action_art[computer_action]}{Style.RESET_ALL}")

    if user_action == computer_action:
        print(f"Both players selected {user_action.name}. It's a tie!")
    elif computer_action in victories[user_action]:
        print(f"{Fore.GREEN}{user_action.name} beats {computer_action.name}! You win!{Style.RESET_ALL}")
    else:
        print(f"{Fore.RED}{computer_action.name} beats {user_action.name}! You lose.{Style.RESET_ALL}")

This code uses the colorama library to add colors to the output, making it more visually appealing.

9. Adding Error Handling and Validation

To make your game more robust, it’s essential to add error handling and validation. This ensures that the game behaves correctly even when the user enters invalid input.

9.1. Handling Invalid Input

Handle invalid input by using try and except blocks:

def get_user_selection():
    while True:
        try:
            choices = [f"{action.name}[{action.value}]" for action in Action]
            choices_str = ", ".join(choices)
            user_action = int(input(f"Enter a choice ({choices_str}): "))
            return Action(user_action)
        except ValueError:
            print("Invalid input. Please enter a valid number.")

This code handles the ValueError exception that is raised when the user enters a non-integer value.

9.2. Validating User Input

Validate user input to ensure it is within the valid range of choices:

def get_user_selection():
    while True:
        try:
            choices = [f"{action.name}[{action.value}]" for action in Action]
            choices_str = ", ".join(choices)
            user_action = int(input(f"Enter a choice ({choices_str}): "))
            if Action(user_action) not in Action:
                raise ValueError
            return Action(user_action)
        except ValueError:
            print("Invalid input. Please enter a valid number.")

This code raises a ValueError if the user enters a number that is not a valid action.

10. Testing Your Rock Paper Scissors Game

Testing is a crucial part of software development. Thoroughly testing your rock paper scissors game ensures that it functions correctly and provides an enjoyable user experience.

10.1. Testing Different Scenarios

Test different scenarios to ensure the game handles all possible outcomes correctly:

  • Tie: Test the game when the user and computer choose the same action.
  • User Wins: Test the game when the user wins with each possible action.
  • Computer Wins: Test the game when the computer wins with each possible action.
  • Invalid Input: Test the game when the user enters invalid input.

10.2. Getting Feedback

Get feedback from other people to identify any issues or areas for improvement. Ask them to play the game and provide their thoughts on the user interface, the rules, and the overall experience.

10.3. Debugging

Use a debugger to identify and fix any bugs in your code. A debugger allows you to step through your code line by line, inspect variables, and identify the cause of any errors.

11. Deploying Your Rock Paper Scissors Game

Once you have thoroughly tested your rock paper scissors game and are confident that it functions correctly, you can deploy it. Deployment involves making your game available for others to play.

11.1. Creating an Executable File

Create an executable file for your game so that others can play it without having to install Python. You can use tools like pyinstaller to create an executable file from your Python code:

pip install pyinstaller
pyinstaller --onefile rock_paper_scissors.py

This will create an executable file in the dist directory.

11.2. Sharing Your Game Online

Share your game online by hosting it on a website or sharing it on social media. You can also submit your game to online game repositories or app stores.

12. Exploring Rockscapes.net for Landscape Design Inspiration

While you’re mastering Python, why not explore the beauty of natural landscapes? Rockscapes.net offers a wealth of inspiration for using rocks in garden design.

12.1. Landscape Design Ideas

Find inspiration for using rocks in your landscape designs. Rockscapes.net offers a variety of ideas, from simple rock gardens to elaborate stone pathways.

12.2. Types of Rocks

Learn about the different types of rocks available for landscaping. Rockscapes.net provides detailed information on various rock types, including granite, slate, and sandstone.

12.3. Rock Installation

Get tips on how to install rocks in your landscape. Rockscapes.net offers step-by-step guides and expert advice on rock installation techniques.

12.4. Contact Information

For more information and to explore the beauty of rock landscapes, visit Rockscapes.net or contact them at:

  • Address: 1151 S Forest Ave, Tempe, AZ 85281, United States
  • Phone: +1 (480) 965-9011
  • Website: rockscapes.net

A rock garden featuring a variety of rock types and succulents

13. Understanding User Search Intent

To optimize your content for search engines, it’s essential to understand user search intent. User search intent refers to the goal or purpose behind a user’s search query.

13.1. Informational Intent

Users with informational intent are looking for information on a specific topic. For example, a user searching for “how to code a rock paper scissors game in Python” is looking for information on how to code the game.

13.2. Navigational Intent

Users with navigational intent are trying to find a specific website or page. For example, a user searching for “rockscapes.net” is trying to find the Rockscapes website.

13.3. Transactional Intent

Users with transactional intent are looking to make a purchase or complete a transaction. For example, a user searching for “buy landscaping rocks near me” is looking to purchase landscaping rocks.

13.4. Commercial Investigation Intent

Users with commercial investigation intent are researching products or services before making a purchase. For example, a user searching for “best landscaping rocks for Arizona” is researching landscaping rocks before making a purchase.

13.5. Local Intent

Users with local intent are looking for local businesses or services. For example, a user searching for “rock suppliers in Tempe AZ” is looking for local rock suppliers in Tempe, Arizona.

14. Optimizing Your Content for Google Discovery

To make your content appear on Google Discovery, you need to optimize it for the platform. Google Discovery is a feed of personalized content that appears on users’ mobile devices.

14.1. High-Quality Images

Use high-quality images in your content. Google Discovery relies heavily on visual content, so it’s essential to use images that are visually appealing and relevant to your content.

14.2. Engaging Headlines

Write engaging headlines that capture the user’s attention. Your headline is the first thing that users will see, so it’s essential to make it compelling and informative.

14.3. Relevant and Timely Content

Create content that is relevant and timely. Google Discovery prioritizes content that is new and relevant to the user’s interests.

14.4. Mobile-Friendly Design

Ensure your website is mobile-friendly. Google Discovery is primarily used on mobile devices, so it’s essential to ensure your website is optimized for mobile viewing.

14.5. Structured Data Markup

Use structured data markup to provide Google with more information about your content. Structured data markup helps Google understand the content of your page and display it in a more informative way on Google Discovery.

15. FAQ: Rock Paper Scissors Game in Python

15.1. What is the basic logic behind the Rock Paper Scissors game?

The basic logic involves comparing the user’s choice with the computer’s choice. Rock beats scissors, paper beats rock, and scissors beat paper.

15.2. How do I take input from the user in Python?

You can use the input() function to take input from the user. For example: user_action = input("Enter your choice: ").

15.3. How can I make the computer choose a random action?

You can use the random.choice() function to make the computer choose a random action from a list of possible actions.

15.4. What is enum.IntEnum and how does it help?

enum.IntEnum allows you to define a set of named integer constants. It helps improve the readability and maintainability of your code by providing a way to represent actions as named constants.

15.5. How do I handle invalid user input in my game?

You can use try and except blocks to handle invalid user input. For example, you can catch the ValueError exception that is raised when the user enters a non-integer value.

15.6. How can I allow the user to play multiple rounds of the game?

You can use a while loop to allow the user to play multiple rounds of the game. The loop will continue to run until the user chooses to stop.

15.7. How do I add more complex rules to the game?

You can use dictionaries to add more complex rules to the game. Dictionaries allow you to specify which actions each action beats.

15.8. Can I enhance the user interface of the game?

Yes, you can enhance the user interface of the game by providing clear instructions, displaying the choices, and showing the results in a more appealing way. You can also add visual elements such as ASCII art or emojis.

15.9. What are some common errors to watch out for when coding this game?

Common errors include not handling invalid user input, not validating user input, and not testing the game thoroughly.

15.10. How do I deploy my Rock Paper Scissors game so others can play it?

You can deploy your game by creating an executable file using tools like pyinstaller and sharing it online or submitting it to online game repositories.

Conclusion

Coding a rock paper scissors game in Python is a fantastic way to learn fundamental programming concepts and improve your coding skills. With Rockscapes.net’s detailed guide, you’ve learned how to take user input, use loops for repeated gameplay, clean up your code with Enum, and add complex rules with dictionaries. By following this step-by-step guide, you can build a fun and engaging game that you can share with your friends and family. Remember to explore Rockscapes.net for landscape design inspiration and to contact them for all your rock landscaping needs.

Ready to create stunning landscapes with rocks? Visit rockscapes.net today to discover beautiful designs, learn about different rock types, and get expert installation tips! Let rockscapes.net help you bring your landscape vision to life.

A close-up of various landscaping rocks used in a garden setting

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *