Question
https://replit.com/@prog108-w23/Project-3-Random-Character-Generator-kerakojima#main.py File main.py, line 75 class = gen_class()^SyntaxError: invalid syntax File main.py, line 53 class = ['Alien', 'Mermaid', 'Human', 'Elf', 'Werewolf'] SyntaxError: invalid syntax File
https://replit.com/@prog108-w23/Project-3-Random-Character-Generator-kerakojima#main.py
File "main.py", line 75 class = gen_class()^SyntaxError: invalid syntax
File "main.py", line 53 class = ['Alien', 'Mermaid', 'Human', 'Elf', 'Werewolf'] SyntaxError: invalid syntax
File "main.py", line 54random.choice(class)SyntaxError: invalid syntax File "main.py", line 57 def display_character(name, characteristics, class): indentationError: expected an indented block
File "main.py", line 80 if__name__ == '__main__': SyntaxError: invalid syntax File "main.py", line 81
main()indentationError: unindent does not match any outer indentation level
help debug program and fix syntax
instructions from teacher:
** Learning Outcomes: **
Use and call functions
Call a function with a parameter
Import the random module
Use if/else if/else statements to determine the flow of the program
Comment your code
Debug your code
Test your code
Scenario
Create a character generator program for a Role Playing game. The character can be any type of character you want it to be. You can opt for standard Dungeons and Dragons style here, or go with any other character you might want. As always, you are welcome to go above and beyond as long as you meet these minimum requirements.
Be creative and generate something that you have interest in. I've had people build generators for ice cream sundaes, robots, cars, musicians, parents, Nintendo characters, cartoon characters, superheroes, famous artists, relationship/family predictions, etc. Have fun!
** The program must do the following: **
Comment your code with your name, date, assignment title, and class.
Comment your code to document your code process and functions.
Ask if the user would like to generate a character (or whatever your program will do).
Ask for a character name. Or provide a name for them - you can have a lot of fun generating a random name too.
Generate at least 5 different characteristics of a character (such as strength, intellect, hit points, wisdom, charisma, etc.) and assign a random value to each of them.
Use at least TWO functions. One function must **pass a parameter. **
Import and use the random module. Use a random number and if statement to generate a class/race or character type (such as human warrior, or alien from Mars, etc.)
Output the character information and all of their stats in a user friendly format.
Ask if the user would like to create a different character.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started