A ship has sufficient food to supply 600 passengers for 3 weeks. How long would the food last for 900 people?

Let's assume that the amount of food required per person per week remains constant.

If 600 passengers can be supplied for 3 weeks, the total food supply is 600 passengers * 3 weeks = <<600*3=1800>>1800 person-weeks.
To find out how long the food would last for 900 people, we divide the total food supply by the number of people: 1800 person-weeks / 900 people = <<1800/900=2>>2 weeks. Answer: \boxed{2}.

To solve this problem, we can use the concept of direct variation.

First, let's find the rate at which the food is being consumed per person per week.

The rate can be calculated by dividing the number of passengers by the number of weeks the food can last for:

600 passengers / 3 weeks = 200 passengers per week

Now, we can find out how long the food will last for 900 people by setting up a proportion:

600 passengers / 200 passengers per week = 900 passengers / x weeks

Cross-multiplying gives:

600x = 900 * 200

Simplifying further:

600x = 180,000

Now, divide both sides by 600:

x = 180,000 / 600

x = 300

Therefore, the food will last for 300 weeks when there are 900 people onboard.