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
Molodets [167]
3 years ago
15

2.13) A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for ea

ch additional inch. Write a program that reads the data in the file and outputs the full name and ideal body weight for each person. In the next chapter, you will learn about loops, which allow for a more efficient way to solve this problem.
Computers and Technology
1 answer:
kirill [66]3 years ago
7 0

Answer:

import csv

def ideal_weight( filename ):

   with open( "filename", "r" ) as file:

       for row in csv.DictReader( file):

           print ( "Name of person: ",row["name"] )

           person_weight = ( 110 * row["height"] )/ 5

           print ( "Ideal weight: ", person_weight )

Explanation:

The python source code above is a function which recieves a csv file argument, opens the file and reads each row an ordered dictionary. The function prints the name of each person in the file and their ideal weight.

You might be interested in
"the most common way to access the internet is through ________."
liubo4ka [24]
The most common was is your phone
6 0
3 years ago
When a router fails to send messages in a timely fashion, this is a problem of the _____.
natima [27]
<span>network layer  

hope it helped</span>
4 0
2 years ago
Choose all of the items that accurately describe an operating system.
Simora [160]

Answer:

provides the platform that application software runs on, manages a computer's hardware, and implements features like file and folder management.

Explanation:

6 0
2 years ago
A popular Voice over Internet Protocol (VoIP) service is ________.
Aloiza [94]
The answer would be Skype
8 0
2 years ago
Natalie wants to create a database to collect information about sales transactions. She would like to use the database to look u
Lynna [10]

Answer:

Customer Table

  1. Customer name
  2. Customer id

Product Table

  1. Product id/number (primary key, auto increment)
  2. Product name
  3. Product sale price

Transactions Table

  1. Transaction Id
  2. Customer Id
  3. Product id
  4. Quantity
  5. Price
  6. Date

Explanation:

Natalie wants to fetch following information from database

  1. Look up customer name and sale price
  2. Sort items in db by product number

To lookup customer name and sale price perform a join on Transactions table and Customer table.Assuming database is build in mysql the query to fetch required results would be

select transction.productId,transaction.customerid,customer.customername from transactions join customer ON

customer.customerid=transcation.customerid

where productid="user provided product id of returned product"

For sorting products by number set produc number in product table a auto increment primary key

7 0
3 years ago
Other questions:
  • ________ employees state-of-the-art computer software and hardware to help people work better together.
    15·1 answer
  • 17) you need to locate an article that (1) is published by a university or proffessional association(2) is authored by clearly d
    6·1 answer
  • Your windows system is used by several people, so you want increase security by requiring users to create passwords that are at
    9·1 answer
  • How to add a bill using the reciept capture?
    7·1 answer
  • // This class calculates a waitperson's tip as 15% of the bill public class DebugThree1 { public static void main(String args[])
    10·1 answer
  • B. Some of Company X's new practices and systems are unethical. Business ethics is a set of codes
    5·1 answer
  • How will technology help people with disabilities become more transportation independent?.
    5·1 answer
  • Does anyone have any tips on how to begin a 10 page Capstone project paper? I've got to write a write a research paper on the ty
    14·2 answers
  • find_cow(name, cows) Given a name and a Python list of Cow objects, return the Cow object with the specified name. If no such Co
    7·1 answer
  • An entity is said to be _____-dependent if it can exist in the database only when it is associated with another related entity o
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!