In the video game Animal Crossing: New Horizons, villagers are organized by Personality and Hobby.


The 8 Personalities are:


Normal

Lazy

Sisterly

Snooty

Cranky

Jock

Peppy

Smug


The 6 Hobbies are:


Education

Fashion

Fitness

Music

Nature

Playing


Create a program that allows the user to create their own Animal Crossing villager. The user should be able to enter a name, after which the program will choose a random Hobby and Personality for the villager:


"Please enter a Villager Name:

>> Betsy

Betsy is Snooty and into Nature"


The program should store both the Hobbies and Personalities in lists, and when creating a villager it should randomly choose from each list for the personality.



Requirements:

· Both Personalities and Hobbies must be stored in lists

· You must generate a different random number to determine the hobby and personality (that is, don't generate 1 random number and use it for both lists, as that prevents many combinations)

· In randomizing, you should make sure that all combinations are possible (that is, make sure you don't accidentally leave out a personality or hobby from random generation)

· The program shouldn't crash

Respuesta :

The video game program is an illustration of randomization and lists

  • Randomization involves generating random numbers or selecting random options
  • Lists are variables that hold multiple values

The video game program

The video game program written in Python, where comments are used to explain each action is as follows:

#This imports the random package

import random

#This creates a list for personalities

Personality = ["Normal","Lazy","Sisterly","Snooty","Cranky","Jock","Peppy","Smug"]

#This creates a list for hobbies

Hobbies = ["Education","Fashion","Fitness","Music","Nature","Playing"]

#This gets input for name

name = input("Please enter a Villager Name: ")

#This generates a random number for personality

personalityNum = random.randint(0, 7)

#This generates a random number for hobbies

hobbiesNum = random.randint(0, 5)

#This prints the the required output

print(name,"is",Personality[personalityNum],"and into",Hobbies[hobbiesNum])

Read more about Python programs at:

https://brainly.com/question/16397886

ACCESS MORE