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
sergeinik [125]
3 years ago
10

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

is the miles walked. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))
Engineering
2 answers:
Nataly [62]3 years ago
8 0

Answer:

# Program is written in Python Programming Language

# Comments are used for explanatory purpose

# Program starts here

# Accept input

Steps = input (Number of Steps: ")

# Calculate distance

distance = float(2000) * float(steps)

#Print Formatted Result

print('%0.2f' % distance)

# End of Program

.--------

The above program converts number of steps to miles.

At line 5, the number of steps is inputted and stored in variable named Steps.

At line 6, the number of miles is calculated by multiplying 2000 by the content of variable Steps

The result is printed at line 8

Novosadov [1.4K]3 years ago
5 0

Answer:

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

miles = steps / 2000

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

You might be interested in
A 50000 N plane has wings with a span of 30 m and a chord of 6 m. How much cargo can this plane carry while cruising at 550 km/h
soldi70 [24.7K]

Answer:

The amount of cargo the plane can carry is 8707.89 N

Explanation:

The surface area of the wings facing the air = 30×6×2 × sin(2.5) = 15.7 m²

The speed of the plane 550 km/h = 152.78 m/s

The volume of air cut through per second = 15.7 × 152.78 = 2399.07 m³

The mass of air = Volume × Density = 2399.07 × 0.37 = 887.65 kg

Weight of air = Mass × Acceleration due to gravity = 887.65 × 9.81 = 8707.89 N

Given that the plane is already airborne, the additional cargo the plane can carry is given by the available lift force of the plane.

The amount of cargo the plane can carry = 8707.89 N

8 0
4 years ago
List three types of concurrent engineering in manufacturing.
klio [65]

Answer:

A famous example of concurrent engineering is the development of the Boeing 777 commercial aircraft. The aircraft was designed and built by geographically distributed companies that worked entirely on a common product database of C A TIA without building physical mock-ups but with digital product definitions.

8 0
3 years ago
IN JAVA,
Citrus2011 [14]

Answer:

Explanation:

Code:

import java.io.File;

import java.io.FileWriter;

import java.io.IOException;

import java.util.Scanner;

public class Knapsack {

 

  public static void knapsack(int wk[], int pr[], int W, String ofile) throws IOException

  {

      int i, w;

      int[][] Ksack = new int[wk.length + 1][W + 1];

     

      for (i = 0; i <= wk.length; i++) {

  for (w = 0; w <= W; w++) {

  if (i == 0 || w == 0)

  Ksack[i][w] = 0;

  else if (wk[i - 1] <= w)

  Ksack[i][w] = Math.max(pr[i - 1] + Ksack[i - 1][w - wk[i - 1]], Ksack[i - 1][w]);

  else

  Ksack[i][w] = Ksack[i - 1][w];

  }

  }

     

      int maxProfit = Ksack[wk.length][W];

      int tempProfit = maxProfit;

      int count = 0;

      w = W;

      int[] projectIncluded = new int[1000];

      for (i = wk.length; i > 0 && tempProfit > 0; i--) {

         

      if (tempProfit == Ksack[i - 1][w])

      continue;    

      else {

          projectIncluded[count++] = i-1;

      tempProfit = tempProfit - pr[i - 1];

      w = w - wk[i - 1];

      }

     

      FileWriter f =new FileWriter("C:\\Users\\gshubhita\\Desktop\\"+ ofile);

      f.write("Number of projects available: "+ wk.length+ "\r\n");

      f.write("Available employee work weeks: "+ W + "\r\n");

      f.write("Number of projects chosen: "+ count + "\r\n");

      f.write("Total profit: "+ maxProfit + "\r\n");

     

  for (int j = 0; j < count; j++)

  f.write("\nProject"+ projectIncluded[j] +" " +wk[projectIncluded[j]]+ " "+ pr[projectIncluded[j]] + "\r\n");

  f.close();

      }    

  }

 

  public static void main(String[] args) throws Exception

  {

      Scanner sc = new Scanner(System.in);

      System.out.print("Enter the number of available employee work weeks: ");

      int avbWeeks = sc.nextInt();

      System.out.print("Enter the name of input file: ");

  String inputFile = sc.next();

      System.out.print("Enter the name of output file: ");

      String outputFile = sc.next();

      System.out.print("Number of projects = ");

      int projects = sc.nextInt();

      int[] workWeeks = new int[projects];

      int[] profit = new int[projects];

     

      File file = new File("C:\\Users\\gshubhita\\Desktop\\" + inputFile);

  Scanner fl = new Scanner(file);

 

  int count = 0;

  while (fl.hasNextLine()){

  String line = fl.nextLine();

  String[] x = line.split(" ");

  workWeeks[count] = Integer.parseInt(x[1]);

  profit[count] = Integer.parseInt(x[2]);

  count++;

  }

 

  knapsack(workWeeks, profit, avbWeeks, outputFile);

  }

}

Console Output:

Enter the number of available employee work weeks: 10

Enter the name of input file: input.txt

Enter the name of output file: output.txt

Number of projects = 4

Output.txt:

Number of projects available: 4

Available employee work weeks: 10

Number of projects chosen: 2

Total profit: 46

Project2 4 16

Project0 6 30

8 0
3 years ago
Lars is a medical coder. He works for a hospital in Wisconsin but currently lives in Georgia. Lars does his work online and over
Brums [2.3K]
The answer is True because he works in one location while on another
6 0
3 years ago
Which of the following identifies the limitations of green engineering?
olga_2 [115]

Answer:

Resources and Cost

Explanation:

  • Cost: Sustainable choices can value a lot of as a result of they price makers more to provide. Thus, there'll always be an oversized initial investment once selecting a green element for your home.
  • Resources: Sustainable materials don't seem to be always as without delay available as their less eco-friendly alternatives.

Hope it helps!<3

4 0
3 years ago
Other questions:
  • The throttling valve is replaced by an isentropic turbine in the ideal vapor-compression refrigeration cycle to make the ideal v
    6·1 answer
  • Consider a unidirectional continuous fiber-reinforced composite with epoxy as the matrix with 55% by volume fiber.i. Calculate t
    10·1 answer
  • A full-scale working model used to test a design solution by making actual observations and necessary adjustments.
    8·1 answer
  • A power cycle under development has two options for a condenser. One outputs saturated water and one outputs saturated vapor. Th
    12·2 answers
  • An ideal neon sign transformer provides 9130 V at 51.0 mA with an input voltage of 240 V. Calculate the transformer's input powe
    11·1 answer
  • A compressor receives air at 290 K, 95 kPa and shaft work of 5.5 kW from a gasoline engine. It should deliver a mass flow rate o
    7·1 answer
  • Slovee plz asap<br> pzllzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
    6·2 answers
  • Giving away points hope they help with your questions
    14·1 answer
  • What is an OTG USB? how is it useful ​
    14·1 answer
  • Topic 4: Workers Rights Practice Worksheet Crossword Puzzle OSHA Provides Workers the Right to: Across _andmedicalre cords 6. In
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!