- 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

11th Jul 2022, 7:51 PM
Yekeen Nasir
19 odpowiedzi
+ 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
11th Jul 2022, 8:31 PM
Felix Alcor
Felix Alcor - avatar
+ 1
What help do you want? About code..? You need try and share your attempt here..!
11th Jul 2022, 7:55 PM
Jayakrishna 🇮🇳
+ 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
11th Jul 2022, 8:01 PM
Jayakrishna 🇮🇳
+ 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
13th Jul 2022, 7:43 AM
Babatunde Jelili
Babatunde Jelili - avatar
0
It is javascript Pls help me solve the question
11th Jul 2022, 7:57 PM
Yekeen Nasir
0
Time is what am looking for
11th Jul 2022, 8:03 PM
Yekeen Nasir
0
Felix Alcor i tried imputing the code but it didn't work
12th Jul 2022, 11:59 PM
Yekeen Nasir
0
Felix Alcor show me ur code
12th Jul 2022, 11:59 PM
Yekeen Nasir
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.
13th Jul 2022, 12:23 AM
Felix Alcor
Felix Alcor - avatar
0
Felix Alcor alright Give ma a minute
13th Jul 2022, 12:24 AM
Yekeen Nasir
0
Felix Alcor calc = 590 / 40 sum = calc * 60 console.log(sum
13th Jul 2022, 12:26 AM
Yekeen Nasir
0
calc = 150/40 sum = calc *60 console.log(sum) the formula isn't wrong but you need to make an Input
13th Jul 2022, 12:42 AM
Felix Alcor
Felix Alcor - avatar
0
Can u give me a description of the input u are talking about?? Felix Alcor 🙏
13th Jul 2022, 12:43 AM
Yekeen Nasir
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
13th Jul 2022, 12:46 AM
Felix Alcor
Felix Alcor - avatar
0
But in the description's written the Input's already there so you should mostly Likely use the variable von there.
13th Jul 2022, 12:47 AM
Felix Alcor
Felix Alcor - avatar
0
babatunde jeleel I think you got into the wrong question for that. We talk here about road Trips.
13th Jul 2022, 8:07 AM
Felix Alcor
Felix Alcor - avatar
0
Ok
13th Jul 2022, 8:08 AM
Babatunde Jelili
Babatunde Jelili - avatar
- 1
Explanation: It will take 150/40 = 3.75 hours to cover the distance, which is equivalent to 3.75*60 = 225 minutes.
11th Jul 2022, 7:56 PM
Yekeen Nasir
- 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
13th Jul 2022, 2:11 PM
Konda Sandeep
Konda Sandeep - avatar