Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Queries (Use python) Create a database and insert the data from a csv file in an IDE. After the database has been created and the

Queries (Use python)

Create a database and insert the data from a csv file in an IDE.

After the database has been created and the data inserted from a csv file(10 points), the program should show an interactive prompt. Users should see a main menu as the one displayed in the picture. Each number should perform a certain action and run appropriate queries as described below.

1. List all planets. After pressing number 1 followed by enter the program should list the names of all the planets. Users will need to click any key to return to the main menu. (10 points)

2. Search for planet details. After pressing number 2 followed by enter the program should ask the user to enter the name of the planet. After the user enters the data and presses enter all the details of the planet should be displayed. Users will need to click any key to return to the main menu. Users will need to click any key to return to the main menu. (20 points)

3. Search for species with height higher than given number. After pressing number 3 followed by enter the program should ask the user to enter the average height of the species. The program should list all the species fulfilling the given condition. Users will need to click any key to return to the main menu. (20 points)

4. What is the most likely desired climate of the given species? After pressing number 4 followed by enter the program should ask the user to enter the name of the species. After the user enters the data and presses enter the question should be answered. (40 points)

CSV file 1(Planets)

name,rotation_period,orbital_period,diameter,climate,gravity,terrain,surface_water,population
Alderaan,24,364,12500,temperate,1 standard,"grasslands, mountains",40,2000000000
Yavin IV,24,4818,10200,"temperate, tropical",1 standard,"jungle, rainforests",8,1000
Hoth,23,549,7200,frozen,1.1 standard,"tundra, ice caves, mountain ranges",100,NA
Dagobah,23,341,8900,murky,N/A,"swamp, jungles",8,NA
Bespin,12,5110,118000,temperate,"1.5 (surface), 1 standard (Cloud City)",gas giant,0,6000000
Endor,18,402,4900,temperate,0.85 standard,"forests, mountains, lakes",8,30000000
Naboo,26,312,12120,temperate,1 standard,"grassy hills, swamps, forests, mountains",12,4500000000
Coruscant,24,368,12240,temperate,1 standard,"cityscape, mountains",NA,1000000000000
Kamino,27,463,19720,temperate,1 standard,ocean,100,1000000000
Geonosis,30,256,11370,"temperate, arid",0.9 standard,"rock, desert, mountain, barren",5,100000000000

CSV file 2(Species)

name,classification,designation,average_height,skin_colors,hair_colors,eye_colors,average_lifespan,language,homeworld
Hutt,gastropod,sentient,300,"green, brown, tan",NA,"yellow, red",1000,Huttese,Nal Hutta
Yoda's species,mammal,sentient,66,"green, yellow","brown, white","brown, green, yellow",900,Galactic basic,NA
Trandoshan,reptile,sentient,200,"brown, green",none,"yellow, orange",NA,Dosh,Trandosha
Mon Calamari,amphibian,sentient,160,"red, blue, brown, magenta",none,yellow,NA,Mon Calamarian,Mon Cala
Ewok,mammal,sentient,100,brown,"white, brown, black","orange, brown",NA,Ewokese,Endor
Sullustan,mammal,sentient,180,pale,none,black,NA,Sullutese,Sullust
Neimodian,NA,sentient,180,"grey, green",none,"red, pink",NA,Neimoidia,Cato Neimoidia
Gungan,amphibian,sentient,190,"brown, green",none,orange,NA,Gungan basic,Naboo
Toydarian,mammal,sentient,120,"blue, green, grey",none,yellow,91,Toydarian,Toydaria

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

More Books

Students also viewed these Databases questions

Question

Be aware of workplace issues that are specific to LGBT employees

Answered: 1 week ago

Question

Explain the differences between authority and persuasion.

Answered: 1 week ago