- 1
Pls help me with this
You need to plan a road trip. You are traveling at an average speed of 40 miles an hour. Given a distance in miles as input (the code to take input is already present), output to the console the time it will take you to cover it in minutes. Sample Input: 150 Sample Output: 225
19 ответов
+ 2
The time you search need to be calculated with the way Yekeen Nasir showed. (distance/milesPerHour)*60
edit: You know everything yourself, now just make the code
+ 1
What help do you want?
About code..? You need try and share your attempt here..!
+ 1
All Explanation is clearly given..
I try but where is your attempt?
* take the distance as input.
* find the time with the given formula
distance/speed
* convert the result into minutes.
* output the result..
edit:
Yekeen Nasir
time = distance/speed
+ 1
Tracking your BMI is a useful way of checking if you’re maintaining a healthy weight. It’s calculated using a person's weight and height, using this formula: weight / height²
The resulting number indicates one of the following categories:
Underweight = less than 18.5
Normal = more or equal to 18.5 and less than 25
Overweight = more or equal to 25 and less than 30
Obesity = 30 or more
Let’s make finding out your BMI quicker and easier, by creating a program that takes a person's weight and height as input and outputs the corresponding BMI category.
Sample Input
85
1.9
Sample Output
Normal
0
It is javascript
Pls help me solve the question
0
Time is what am looking for
0
Felix Alcor i tried imputing the code but it didn't work
0
Felix Alcor show me ur code
0
Yekeen Nasir I didn't wrote a Code for that. I don't even know which Challenge that is.
I would rather ask you to Show us your code that we can find the flaw.
0
Felix Alcor alright
Give ma a minute
0
Felix Alcor calc = 590 / 40
sum = calc * 60
console.log(sum
0
calc = 150/40
sum = calc *60
console.log(sum)
the formula isn't wrong but you need to make an Input
0
Can u give me a description of the input u are talking about?? Felix Alcor 🙏
0
The value by the Test case's only 150 but it shouldn't be the General Input. You need to write.
const variableName = prompt()
And then variableName/40*60
0
But in the description's written the Input's already there so you should mostly Likely use the variable von there.
0
babatunde jeleel I think you got into the wrong question for that. We talk here about road Trips.
0
Ok
- 1
Explanation: It will take 150/40 = 3.75 hours to cover the distance, which is equivalent to 3.75*60 = 225 minutes.
- 1
Simple logic
Given speed is 40 miles / hour
-> 40 miles / 60 minutes
-> 2 miles / 3 minutes
Asked what time for given miles
Output time = input* 3 / 2