Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How to make a program to allow users to choose between Chinese, Japanese, or Vietnamese zodiacs. Program Modification: Modify the Chinese Zodiac program to allow
How to make a program to allow users to choose between Chinese, Japanese, or Vietnamese zodiacs.
Program Modification: Modify the Chinese Zodiac program to allow the user to select either the Chinese Zodiac (C), the Japanese Zodiac (J), or the Vietnamese Zodiac (V). The Japanese Zodiac is the same as the Chinese Zodiac, except that 'Pig' is substituted with 'Wild Boar.The Vietnamese Zodiac is also the same except that the 'Ox' is substituted with 'Water Buffalo' and 'Rabbit' is replaced with Cat' Program Execution: This program will display your Chinese, Japanese or Vietnamese zodiac sign and associated personal characteristics. Enter (C)hinese, (J) apanese, or (V)ietnamese: J Enter your year of birth (yyyy) 1986 Your Chinese zodiac sign is the Tiger Your personal characteristics Unpredictable, rebellious, passionate, daring, impulsive Would you like to enter another year? (y):n I am going to give you a little guidance on how to modify your current program. 1) 2) Save your current file as modifiedZodiacyourlastname.py Your program should work exactly the same but you are just going to have to do some modifications in the initialization section, before the actual game play starts. Change your program greeting to match the new options the user can enter like in the prog execution above 3) This program will display your Chinese, Japanese or Vietnamese zodiac sign and associated personal characteristics. Right after the program greeting, we need to prompt the user for the zodiac_type Enter (C) hinese, (J) apanese, or (V) ietnamese:J 4) a. While the user doesn't enter a correct zodiac type ("C','J', or'V') i. ii. Tell the user it was an invalid option Ask the user again 5) Now we need to prep our program to handle the three different animal options a. We need to create three new variables to hold the three different animal types an initialize them to the original Chinese option for the Zodiac Animals i. ii. rabbit type - 'Rabbit' ox-type Ox, = iii. pigtype - 'Pig, - 6) Now that we have the three variables to hold our type, we need to update the types if the selects the Japanese zodiac or the Vietnamese Zodiac. a. If the user selects the Japanese zodiac i. Change the pig_type to be 'Wild Boar' b. Else if the user selects the Vietnamese zodiad i. ii. Change the ox_type to be the 'Water Buffalo' Change the rabbit_type to be the 'Cat' 7) Program should proceed as before 8) The final thing you should look at is inside the game play (in the while loop) In the print statement where you tell the user their zodiac sign, this should now say appropriate type based on zodiac_type, so the word Chinese could be either Japanese or Vietnamese a. Your Chinese zodiac sign is the Tiger Program Modification: Modify the Chinese Zodiac program to allow the user to select either the Chinese Zodiac (C), the Japanese Zodiac (J), or the Vietnamese Zodiac (V). The Japanese Zodiac is the same as the Chinese Zodiac, except that 'Pig' is substituted with 'Wild Boar.The Vietnamese Zodiac is also the same except that the 'Ox' is substituted with 'Water Buffalo' and 'Rabbit' is replaced with Cat' Program Execution: This program will display your Chinese, Japanese or Vietnamese zodiac sign and associated personal characteristics. Enter (C)hinese, (J) apanese, or (V)ietnamese: J Enter your year of birth (yyyy) 1986 Your Chinese zodiac sign is the Tiger Your personal characteristics Unpredictable, rebellious, passionate, daring, impulsive Would you like to enter another year? (y):n I am going to give you a little guidance on how to modify your current program. 1) 2) Save your current file as modifiedZodiacyourlastname.py Your program should work exactly the same but you are just going to have to do some modifications in the initialization section, before the actual game play starts. Change your program greeting to match the new options the user can enter like in the prog execution above 3) This program will display your Chinese, Japanese or Vietnamese zodiac sign and associated personal characteristics. Right after the program greeting, we need to prompt the user for the zodiac_type Enter (C) hinese, (J) apanese, or (V) ietnamese:J 4) a. While the user doesn't enter a correct zodiac type ("C','J', or'V') i. ii. Tell the user it was an invalid option Ask the user again 5) Now we need to prep our program to handle the three different animal options a. We need to create three new variables to hold the three different animal types an initialize them to the original Chinese option for the Zodiac Animals i. ii. rabbit type - 'Rabbit' ox-type Ox, = iii. pigtype - 'Pig, - 6) Now that we have the three variables to hold our type, we need to update the types if the selects the Japanese zodiac or the Vietnamese Zodiac. a. If the user selects the Japanese zodiac i. Change the pig_type to be 'Wild Boar' b. Else if the user selects the Vietnamese zodiad i. ii. Change the ox_type to be the 'Water Buffalo' Change the rabbit_type to be the 'Cat' 7) Program should proceed as before 8) The final thing you should look at is inside the game play (in the while loop) In the print statement where you tell the user their zodiac sign, this should now say appropriate type based on zodiac_type, so the word Chinese could be either Japanese or Vietnamese a. Your Chinese zodiac sign is the TigerStep 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