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]
2 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]2 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]2 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
Write a modular program that finds the equation, area, and circumference of a circle, given the coordinates of the center of the
Semenov [28]

Answer:

Explanation:

#include <bits/stdc++.h>

#include <iostream>

#include <string>

#include <cmath>

using namespace std;

//this function reads the cooridnates of Center from the user

//parameteres are pointer variables of Cx,Cy

//it does not return anything and stores coordinates at given addresses of Cx,Cy

void readCenter(int *Cx,int *Cy)

{

string cooridnates;

cout << "Enter the x and y cooridnates of the centre of the circle separated by comma: " ;

getline(cin,cooridnates);//reading inputs

//convering string ot integer

string x = cooridnates.substr(0, cooridnates.find(","));

string y = cooridnates.substr(cooridnates.find(",")+1);

*Cx=stoi(x);

*Cy=stoi(y);

}

//this function reads the cooridnates of Point from the user

//parameteres are pointer variables of Px,Py

//it does not return anything and stores coordinates at given addresses of Px,Py

void readPoint(int *Px,int *Py)

{

string cooridnates;

cout << "Enter the x and y cooridnates of a point on the circle separated by comma: " ;

getline(cin,cooridnates);//reading inputs

//convering string ot integer

string x = cooridnates.substr(0, cooridnates.find(","));

string y = cooridnates.substr(cooridnates.find(",")+1);

*Px=stoi(x);

*Py=stoi(y);

}

double findArea(double radius)

{

double pi=acos(-1);

return pi*pow(radius,2);

}

double findCircum(double radius)

{

double pi=acos(-1);

return 2*pi*radius;

}

int main()

{

int Cx,Cy;

int Px,Py;

readCenter(&Px,&Py);

readPoint(&Cx,&Cy);

double radius=sqrt(pow((Px-Cx),2)+pow((Py-Cy),2));

cout<<"The circle has an area of "<<findArea(radius)<<" sqaure units\n";

cout<<"The circle has a Circumference of "<<findCircum(radius)<<" units";

return 0;

}

3 0
3 years ago
Air is to be heated steadily by an 8-kW electric resistance heater as it flows through an insulated duct. If the air enters at 5
Furkat [3]

To solve this problem it is necessary to apply the concepts related to the heat exchange of a body.

By definition heat exchange in terms of mass flow can be expressed as

W = \dot{m}c_p \Delta T

Where

C_p = Specific heat

\dot{m}= Mass flow rate

\Delta T = Change in Temperature

Our values are given as

C_p = 1.005kJ/kgK \rightarrow Specific heat of air

T_1 = 50\°C

\dot{m} = 2kg/s

W = 8kW

From our equation we have that

W = \dot{m}c_p \Delta T

W = \dot{m}c_p (T_2-T_1)

Rearrange to find T_2

T_2 = \frac{W}{\dot{m}c_p}+T_1

Replacing

T_2 = \frac{8}{2*1.005}+(50+273)

T_2 = 326.98K \approx 53.98\°C

Therefore the exit temperature of air is 53.98°C

6 0
3 years ago
For two different air velocities, the Nusselt number for two different diameter cylinders in cross flow is the same. The average
densk [106]
C smaller than that of the larger-diameter cylinder
3 0
2 years ago
Oil, with density of 900 kg/m3 and kinematic viscosity of 0.00001 m2/s, flows at 0.2 m3/s through 500 m of 200-mm-diameter cast-
Vsevolod [243]
Just trying to personally understand this is making me shed a few tears. Good luck with finding someone to answer your question!
5 0
2 years ago
What is one major life lesson you learned from the movie; ¨Spare Parts¨
allochka39001 [22]

Answer:

darts,” a smart, creative and highly-enjoyable drama about a team of intelligent, hard-working and ambitious high school students who enter a prestigious robotics competition, and their dedicated science teacher who mentors, educates, pushes and inspires them, is a rousing, uplifting, spirited–and excellent–film and a great start to the new film

6 0
3 years ago
Read 2 more answers
Other questions:
  • How does fouling affects the performance of a heat exchanger?
    6·1 answer
  • Use the orange points (square symbol) to plot the initial short-run industry supply curve when there are 20 firms in the market.
    5·1 answer
  • Determine the output torque To????????p????????, the speed reduction ratio of the transmission R, the tangential loads imposed o
    13·2 answers
  • For a bronze alloy, the stress at which plastic deformation begins is 297 MPa and the modulus of elasticity is 113 GPa. (a) What
    7·1 answer
  • In the given circuit, V(t)=12cos(2000t+45)V, R1=R2=2Ω, L1=L2=L3=3mH and C1=250μF. You are required to find the Thevenin equivale
    7·1 answer
  • What are the benefits of using a multi view sketch to communicate a design
    14·1 answer
  • Define ways in which you would go about networking to explore opportunities in your career field and obtain more information for
    11·1 answer
  • Introduction for site visit​
    13·1 answer
  • Similarity of surface<br>and ground<br>waler​
    9·1 answer
  • A 75-hp motor that has an efficiency of 91.0% is worn-out and is replaced by a motor that has a high efficiency 75-hp motor that
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!