Get detailed and accurate answers to your questions on IDNLearn.com. Get prompt and accurate answers to your questions from our community of knowledgeable experts.
Problemexpand_less
A good superhero gives hope to people in trouble. Let's create a generator for random superhero ideas - the results might be silly, but maybe it will give you the inspiration you need to create a great hero!
Default Random Choicesexpand_less
Name
Even chance of starting with "Captain", "Doctor", "Star", "Power", "The Human"
Ends with a word determined by the power theme
Power Theme
2 in 8 chance: "fire" (+3 power)
2 in 8 chance: "wind" (+3 power)
2 in 8 chance: "water" (+3 power)
1 in 8 chance: "ghosts" (+4 power)
1 in 8 chance: "light" (+2 power)
Power Description
1 in 10 chance: can "summon" the theme (+4 power)
3 in 10 chance: can "turn into" the theme (+3 power)
3 in 10 chance: can "shoot beams of" the theme (+2 power)
3 in 10 chance: can "talk to" the theme (+1 power)
Extra Power
There is a 1 in 2 chance the hero has an extra power
If they do, there is an even chance of these options:
"is invincible" (+4 power)
"can stop time" (+3 power)
"is an expert hacker" (+3 power)
"can fly" (+2 power)
Inputexpand_less
None
Outputexpand_less
Superhero name
Hero abilities
Rating of the superhero's power
Requirements expand_less
Use multiple random choices to generate a superpower and hero name
Use weighted choice to make some power options rarer and more powerful than others
Track the hero's power rating depending on the choices of power
"""
Built-In Libraries
Coding Exercise: Randomness
Super Random
"""
Thank you for contributing to our discussion. Don't forget to check back for new answers. Keep asking, answering, and sharing useful information. Discover insightful answers at IDNLearn.com. We appreciate your visit and look forward to assisting you again.