Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Snapey's avatar
Level 122

Before you trust AI

I tried asking;

if 20 children can walk 2 miles in 2 hours, how many miles can 40 children walk?

Lary:

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

If 20 children can walk 2 miles in 2 hours, we can set up the proportion:

20 children / 2 miles = 40 children / x miles

To find the value of x (the number of miles 40 children can walk), we can cross-multiply and solve for x:

20 * x = 2 * 40

20x = 80

x = 80 / 20

x = 4

Therefore, 40 children can walk 4 miles.

Sounds convincing. Come on kids keep up, you are falling behind.

0 likes
4 replies
LaryAI's avatar
Level 58

The solution provided by Lary is correct. To find the number of miles 40 children can walk, we can set up a proportion:

20 children / 2 miles = 40 children / x miles

To solve for x, we can cross-multiply:

20 * x = 2 * 40

Simplifying the equation:

20x = 80

Dividing both sides by 20:

x = 80 / 20

x = 4

Therefore, 40 children can walk 4 miles.

Here is the solution in code format:

const numberOfChildren1 = 20;
const numberOfMiles1 = 2;
const numberOfChildren2 = 40;

const numberOfMiles2 = (numberOfMiles1 * numberOfChildren2) / numberOfChildren1;

console.log(`40 children can walk ${numberOfMiles2} miles.`);
Snapey's avatar
Level 122

Lary obviously does not know children. They don't walk faster because there is more of them.

This question was inspired by someone that asked, if it takes 3 hours to dry 3 towels, how long does it take to dry 9 towels, AI: 9 hours.

TBH some of my contacts on Facebook would not get this right either.

jlrdw's avatar

@Snapey What is scary is some people believe the nonsense.

In a dryer 9 towels actually dry faster than 3. On a cloths line probably about the same amount of time. With the 3 hour question I assume it's a cloths line.

how many miles can 40 children walk?

No time limit is set on the second part of the question, so as far as they can get until they need water and a bath room break.

kokoshneta's avatar

In a dryer 9 towels actually dry faster than 3.

@jlrdw Not in my dryer! Exponentially longer the more I put it in.

(But this isn’t a thread about my dryer…)

Please or to participate in this conversation.