1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nataly862011 [7]
3 years ago
15

A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i

s the miles walked. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: printf("%0.2lf", yourValue);
Computers and Technology
2 answers:
kenny6666 [7]3 years ago
7 0

Answer:

steps = int(input("Enter the number of steps: "))

miles = steps / 2000

print('{:.2f}'.format(miles))Explanation:

Explanation:

Amanda [17]3 years ago
6 0

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

   //Prompt and receive user input

       System.out.println("Enter number of Steps");

       int numSteps = in.nextInt();

       double numMiles = numSteps/2000;

       //Print the formated number of miles

       System.out.printf("The equivalent miles is %.2f ",numMiles);

   }

}

Explanation:

  • This is solved using Java programming language
  • Scanner class is imported and used to receive user input (number of steps walked)
  • To convert number of steps to number of miles, we divide by 2000, Since the question says the pedometer treats walking 2,000 steps as walking 1 mile.
  • Output the number of miles to 2 decimal places using java's printf() method
You might be interested in
To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
pickupchik [31]
<span>To give your app users the ability to open your app directly from other apps by clicking a link, you should use:  deep link. With the deep link and its URL functionality, existing app users are driven directly inside the mobile app itself. 
</span>Deep links are usually made up of two parts: a scheme (part of the link that identifies which app to open).<span>and a </span>host and path (<span>the unique location in the app where your content exists).</span>

7 0
2 years ago
A program is required to three (3) numbers. calculate and print their total
podryga [215]

A program that is required to three (3) numbers. calculate and print their total is given below:

<h3>The Program</h3>

import java.util.Scanner;

public class SumAndAverage {

public static void main(String[ ] args) {

System.out.println("Enter three numbers - ");

// Accepting and finding sum of numbers.

int sum = 0;

Scanner sc = new Scanner(System.in);

for (int i = 0; i < 3; i++)

sum += sc.nextInt( );

// Printing sum and average.

System.out.println("Sum - " + sum);

System.out.println("Average - " + (sum / 3f));

}

}

The output would request three different numbers, then add them up, and display the output of the sum and then display or print their total


Read more about programming here:

brainly.com/question/23275071

#SPJ1

5 0
1 year ago
Riodic Table
Ksenya-84 [330]

Answer:

riodic Table

A museum wants to store their valuable documents in cases that contain a gas that will protect the documents.

She should not choose one of the other gases because they are too

The museum director should choose

Explanation:

I didn't understand

8 0
3 years ago
Assume that ip has been declared to be a pointer to int and that result has been declared to be an array of 100 elements . Assum
Bogdan [553]

Answer:

The expression of this question can be given as:

Expression:

*ip + 1

Explanation:

In this question, it is given that ip variable has been declared and initialized and the ip variable is in the first half of the array. It finds the expression whose value is after the element of the array that ip points. So the expression to this question is *ip + 1. Where * is used to define ip variable as a pointer and its value is increased by 1 that is given in the question.

7 0
3 years ago
WILL GIVE BRAINLIEST!!!!!!!!!
sukhopar [10]

Answer:

True

Explanation:

7 0
3 years ago
Other questions:
  • What does utp stand for?
    11·2 answers
  • True or false: a cover letter accompanies a resume to showcase a job-seeker’s personal life
    6·2 answers
  • Write a function that takes an integer value and returns the number with its digits reversed. for example, given the number 7631
    10·1 answer
  • Modify the program you wrote for Chapter 6 Exercise 6 so it handles the following
    15·1 answer
  • In order to personalize your desktop, you may click on: Start&gt;settings&gt;Personalization . . .
    9·1 answer
  • Why does it keep saying this when I’m putting my right credit card number
    6·1 answer
  • Give one (1) advantage and one(1) disadvantage of using and integrated software package over a custom written one.
    15·1 answer
  • Alice recently purchased a new cell phone. After her vacation, Alice wanted to transfer her holiday photos to her computer to do
    8·1 answer
  • Can you exclude header rows from sort in excel?
    8·1 answer
  • What does data warehousing allow organizations to achieve?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!