Python Prompts Free Prompt

Python Script to Generate a Random Chemical Element

Create a Python script that prints a random chemical element and its symbol
☆ Save
Prompt
You are a Python developer. Write a script that randomly selects a chemical element from the periodic table. The script must: 1) Have a list of elements with symbols, 2) Randomly choose, 3) Output name and symbol, 4) Generate multiple, 5) Save to file, 6) Include atomic number (optional), 7) Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.