subject
Computers and Technology, 21.01.2021 22:40 KaleahV

Here is a schema about battleships and the battles they fought in: Ships(name, yearLaunched, country, numGuns, gunSize, displacement)
Battles(ship, battleName, result)
A typical Ships tuple would be:

('New Jersey', 1943, 'USA', 9, 16, 46000)
which means that the battleship New Jersey was launched in 1943; it belonged to the USA, carried 9 guns of size 16-inch (bore, or inside diameter of the barrel), and weighted (displaced, in nautical terms) 46,000 tons. A typical tuple for Battles is:

('Hood', 'North Atlantic', 'sunk')
That is, H. M.S. Hood was sunk in the battle of the North Atlantic. The other possible results are 'ok' and 'damaged'. Write the following queries:

Which battleships launched before 1930 had 16-inch guns? List their names, their country, and the number of guns they carried.
Which battleship(s) had the guns with the largest gun size?
Which battleships had the guns with the second largest gun size. More precisely, find the ships whose gun size was exceeded by only one gun size, no matter how many other ships had that larger gun size. List the names of the ships and their gun size.
List, for each country, the average number of guns carried by their battleships.
List all the pairs of countries that fought each other in battles. List each pair only once, and list them with the country that comes first in alphabetical order first.
For the battle of Surigao Strait, for each country engaged in that battle (had one or more battleships participating), give the number of its battleships that were sunk. Note: this question is very tricky. In particular, you need to deal with the (historical) case that a country engaged in the battle but did not have any ships sunk.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The great length of north america causes the climate to be varied. true false
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
You know the right answer?
Here is a schema about battleships and the battles they fought in: Ships(name, yearLaunched, countr...
Questions
question
Mathematics, 13.10.2019 14:30
question
Chemistry, 13.10.2019 14:30
question
Mathematics, 13.10.2019 14:30
question
Mathematics, 13.10.2019 14:30
Questions on the website: 13722360