Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Advanced level school Python programming. need helps Task 4: elements: 'Physical', 'Fire', 'Ice', 'Lightning', 'Wind', 'Quantum' ' Imaginary' paths : 'Destruction', 'The Hunt', 'Erudition', 'Harmony',

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Advanced level school Python programming. need helps

Task 4: elements: 'Physical', 'Fire', 'Ice', 'Lightning', 'Wind', 'Quantum' ' Imaginary' paths : 'Destruction', 'The Hunt', 'Erudition', 'Harmony', 'Nihility', 'Preservation', 'Abundance' positions: 'Head', 'Body', 'Hand', 'Feet' 'Planar Sphere', 'Link Rope' 4 Star Road Web app In the Star Road game, there are relic sets, which are equipment items which characters can equip themselves with. Each relic sets have their unique set effects, which will boost the power of the characters wearing them. For each relic sets, relics can be generated with random stats. Even if two relics are with the same name, they might have different stats associated with. For example, one of them may have stats that boost the attack value, the other relic may have stats that boost the energy regeneration rate. Characters can choose to wear up to 6 relics, one at each position such as head, body, feet, etc. You are tasked to design a relational database model and a web app to store and display the related information. You may assume that all inputs given are valid. Task 4.1 The following information of each Character is stored: ID - auto increment integer value to keep track of ID of the Character. name - name of the Character. element - element of the Character's attacks, it should be one of the values: 'Physical', 'Fire', 'Ice', 'Lightning', 'Wind', 'Quantum', 'Imaginary' path - path of the Character, it should be one of the values: 'Destruction', 'The Hunt', 'Erudition', 'Harmony', 'Nihility', 'Preservation', 'Abundance'. Stats - stats of a Character, which is a long string of text. The following information of each RelicSet is stored: ID - auto increment integer value to keep track of ID of the relic set. Name - name of the relic set. SetEffect - set effects when wearing more than 1 pieces of the same set. The following information of each Relic is stored: ID - auto increment integer value to keep track of the Relic. Name - name of the relic. Set ID - Relic Set ID. Position - position to be worn by the Character, it should be one of the values: 'Head', 'Body', 'Hand', 'Feet', 'Planar Sphere', 'Link Rope' Stats - stats of a Relic, which is a long string of text. The following information of each Equipment is stored: CharacterID - Character ID. RelicID - Relic ID. The information is to be stored in above mentioned tables: Character RelicSet Relic Equipment Task 4.1 Create an SQL file called Task4_1.sq1 to show the SQL code needed to create the database star_road. db with the above tables. The tables Character, RelicSet, Relic must use ID as its primary key. The table Equipment must use CharacterID and RelicID as its primary key. The SetID in table Relic must refer to ID in RelicSet table as foreign key. CharacterID and RelicID in table Equipment must refer to ID in Character table and ID in Relic table as foreign keys. Save your SQL code as Task4_1.sq1 Task 4.2 The following files contains the past data records. The first row of each file contains the header of the respective columns. Each row in the files is a comma-separated list of information. characters.csv relic_sets.csv relics.csv equipments.csv Write a Python program to insert all information from the files into the database star_road.db. Run the program. Save your program code as Task4_2.py You are tasked to implement a function to display the number of relics of each relic set that are currently equipped by the characters. Query and display a list of data with the following fields as shown in the table, sorted in the descending order by the Count value. Note: To make it simple, if 1 character wears 4 relic pieces from the same relic set, count 4 times. Write the SQL code required. Save this code as Task4_3.sql Task 4.4 You are required to implement a function to search and display a summary of the equipped relics of a character based on the character name. You should display the character name, followed by a table containing the following columns: Relic Name, Position, Relic Set Name, set Effect, Stats Here's a sample result page for your reference: Save all files and folders under the directory Task4_4. Run the web application with a character name input of Seele. Then save the output of the program as Task4_4.html. Task 4.5 [Bonus - Challenge by Choice] You are encouraged to copy and paste your files from Task 4_4 to the new directory Task4_5 before attempting this task. You are tasked to display the information of this page with better clarity and format: - Separate the repeated set name and their set effects. - Display stats in individual columns. - Calculate the overall stats by adding the base stats of the character with all the stats the character has gained from the equipped relics. Here's a sample page for character Seele: Result Page The character is Seele. Set Name: Gerius of Brilliant Stars ignores 10% DEF. Set Name: Space Scaling Station Set Effect: Two Set Effect: Increases the wearer's ATK by 12%. When the wearer's SPD reaches 120 or higher, the wearer's ATK increases by an extra 12%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

What are the steps that the EEOC uses once a charge is filed?

Answered: 1 week ago

Question

What would you do?

Answered: 1 week ago