15,749,184 members
See more:
We have to create a program on the basis that if it takes 3hours to drive a distance of 150km.we have to show how to calculate the average speed I'm km/hour.

What I have tried:

I have not tried because I am unable to use python in which I need too do it
Posted
Updated 11-Dec-22 3:56am
Richard Deeming 14-Dec-22 7:13am
Start by thinking about how you'd calculate the average speed manually on a piece of paper or a calculator.

Then turn those steps into code.

## Solution 1

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you don't know python, then you will fail your course, even if you manage to persuade some mug to do your homework for you. So I'd strongly suggest that you start by learning the language up to the point where your assignment was set and at least try to produce your own solution.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]

CPallini 11-Dec-22 10:08am
5.
Satish Kumar 7 27-Dec-22 22:43pm
It takes 3 hours to drive a distance of 192km on a motor way. Create
a program to calculate the average speed in km/h?
OriginalGriff 28-Dec-22 2:21am
Oh come on!
If you can't work out how to write a program that is one line of simple code involving just one mathematical operator and a "print this" command in the language of your choice then you should give up your development course and learn the magic words: "Do you want fries with that?" - because a career in fast food is about the best you can expect.