Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
4th Edition
ISBN: 9780134444321
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Chapter 6, Problem 12PE

Average Steps Taken

A Personal Fitness Tracker is a wearable device that tracks your physical activity, calories burned, heart rate, sleeping patterns, and so on. One common physical activity that most of these devices track is the number of steps you take each day.

If you have downloaded this book’s source code from the Computer Science Portal, you will find a file named steps.txt in the Chapter 06 Chapter 6, Problem 12PE, Average Steps Taken A Personal Fitness Tracker is a wearable device that tracks your physical folder. (The Computer Science Portal can be found at www.pearsonhlghered.com/gaddls.) The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and each line contains the number of steps taken during a day. (The first line is the number of steps taken on January 1st, the second line is the number of steps taken on January 2nd, and so forth.) Write a program that reads the file, then displays the average number of steps taken for each month (The data is from a year that was not a leap year, so February has 28 days.)

Blurred answer
04:16
Students have asked these similar questions
A Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that mostof these devices track is the number of steps you take each day.If you have downloaded this book’s source code from the Premium Companion Website,you will find a file named steps.txt in the Chapter 06 folder. (The Premium CompanionWebsite can be found at www.pearsonglobaleditions.com/gaddis.) The steps.txt filecontains the number of steps a person has taken each day for a year. There are 365 linesin the file, and each line contains the number of steps taken during a day. (The first line isthe number of steps taken on January 1st, the second line is the number of steps taken onJanuary 2nd, and so forth.) Write a program that reads the file, then displays the averagenumber of steps taken for each month. (The data is from a year that was not a leap year,so February has 28 days.)   Above is my question. I…
A Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that mostof these devices track is the number of steps you take each day.If you have downloaded this book’s source code from the Premium Companion Website,you will find a file named steps.txt in the Chapter 06 folder. (The Premium CompanionWebsite can be found at www.pearsonglobaleditions.com/gaddis.) The steps.txt filecontains the number of steps a person has taken each day for a year. There are 365 linesin the file, and each line contains the number of steps taken during a day. (The first line isthe number of steps taken on January 1st, the second line is the number of steps taken onJanuary 2nd, and so forth.) Write a program that reads the file, then displays the averagenumber of steps taken for each month. (The data is from a year that was not a leap year,so February has 28 days.)   Above is my question. I…
A Personal Fitness Tracker is a wearable device that tracks your physical activity, caloriesburned, heart rate, sleeping patterns, and so on. One common physical activity that mostof these devices track is the number of steps you take each day.If you have downloaded this book’s source code from the Premium Companion Website,you will find a file named steps.txt in the Chapter 06 folder. (The Premium CompanionWebsite can be found at www.pearsonglobaleditions.com/gaddis.) The steps.txt filecontains the number of steps a person has taken each day for a year. There are 365 linesin the file, and each line contains the number of steps taken during a day. (The first line isthe number of steps taken on January 1st, the second line is the number of steps taken onJanuary 2nd, and so forth.) Write a program that reads the file, then displays the averagenumber of steps taken for each month. (The data is from a year that was not a leap year,so February has 28 days.) (in python)

Chapter 6 Solutions

Starting Out with Python (4th Edition)

Ch. 6.1 - In what mode do you open a file if you want to...Ch. 6.2 - Write a short program that uses a for loop to...Ch. 6.2 - Prob. 13CPCh. 6.2 - Assume the file data.txt exists and contains...Ch. 6.2 - Prob. 15CPCh. 6.3 - Prob. 16CPCh. 6.3 - Prob. 17CPCh. 6.3 - Prob. 18CPCh. 6.4 - Prob. 19CPCh. 6.4 - Prob. 20CPCh. 6.4 - What type of exception does a program raise when...Ch. 6.4 - Prob. 22CPCh. 6 - A file that data is written to is known as...Ch. 6 - A file that data is written to is known as...Ch. 6 - Before a file can be used by a program, it must be...Ch. 6 - When a program is finished using a file, it should...Ch. 6 - The contents of this type of file can be viewed in...Ch. 6 - This type of file contains data that has not been...Ch. 6 - When working with this type of file, you access...Ch. 6 - When working with this type of file, you can jump...Ch. 6 - This is a small holding section" in memory that...Ch. 6 - This marks the location of the next item that will...Ch. 6 - When a file is opened in this mode, data will be...Ch. 6 - This is a single piece of data within a record. a....Ch. 6 - Prob. 13MCCh. 6 - Prob. 14MCCh. 6 - Prob. 15MCCh. 6 - When working with a sequential access file, you...Ch. 6 - When you open a file that file already exists on...Ch. 6 - The process of opening a file is only necessary...Ch. 6 - Prob. 4TFCh. 6 - When a file that already exists is opened in...Ch. 6 - Prob. 6TFCh. 6 - You can have more than one except clause in a...Ch. 6 - Prob. 8TFCh. 6 - Prob. 9TFCh. 6 - Describe the three steps that must be taken when a...Ch. 6 - Why should a program close a file when it's...Ch. 6 - What is a read position? where is the read...Ch. 6 - If an existing file is opened in append mode, What...Ch. 6 - If a file does not exist and a program attempts to...Ch. 6 - Write a program that opens an output file with the...Ch. 6 - Write a program that opens the my_name.txt file...Ch. 6 - Write code that does the following: opens an...Ch. 6 - Prob. 4AWCh. 6 - Modify the code that you wrote in problem 4 so it...Ch. 6 - Write code that opens an output file with the...Ch. 6 - A file exists on the disk named students. txt. The...Ch. 6 - A file exists on the disk named students txt. The...Ch. 6 - Prob. 9AWCh. 6 - Prob. 10AWCh. 6 - File Display Assume a file containing a series of...Ch. 6 - File Head Display Write a program that asks the...Ch. 6 - Line Numbers Write a program that asks the user...Ch. 6 - Item Counter Assume a file containing a series of...Ch. 6 - Sum of Numbers Assume a file containing a series...Ch. 6 - Average of Numbers Assume a file containing a...Ch. 6 - Random Number File Writer Write a program that...Ch. 6 - Random Number File Reader This exercise assumes...Ch. 6 - Prob. 9PECh. 6 - Golf Scores The Springfork Amateur Golf Club has a...Ch. 6 - Personal Web Page Generator Write a program that...Ch. 6 - Average Steps Taken A Personal Fitness Tracker is...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • Binary packing compresses executable code and adds functionality to the application to uncompress the code at runtime true or false
    C++. Please do not change the existing code. The instructions are in the image that is provided. Please zoom in or you can download the png file. Can you please provide every section of code that is needed there is Time.cpp, Time.h, Date.cpp, Date.h, Event.cpp, Event.h, and main.cpp. Thank you! Time.cpp #include "Time.h" //Default Constructor //Constructor with parameters int Time::getHour() const { return hour; }int Time::getMinute() const { return minute; }int Time::getSecond() const { return second; }void Time::setHour(int h) { hour = h; }void Time::setMinute(int m) { minute = m; }void Time::setSecond(int s) { second = s; } int Time::timeToSeconds() const{    return (getSecond() + getMinute() * 60 + getHour() * 3600);} const Time Time::secondsToTime(int s) const{    int resultS = s % 60;    s /= 60;    int resultM = s % 60;    s /= 60;    int resultH = s % 24;    return Time(resultH, resultM, resultS);} //toString // + // - // < // > // == ------ Time.h #ifndef TIME#define…
    Theater RevenueA movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create a GUI application that allows the user to enter the following data into text fields:� Price per adult ticket� Number of adult tickets sold� Price per child ticket� Number of child tickets soldThe application should calculate and display the following data for one night�s box office business at a theater:� Gross revenue for adult tickets sold. This is the amount of money taken in for all adult tickets sold.� Net revenue for adult tickets sold. This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted.� Gross revenue for child tickets sold. This is the amount of money taken in for all child tickets sold.� Net revenue for child tickets sold. This is the amount of money from child ticket sales left over after the payment to the movie company has been deducted.� Total gross revenue. This…
  • Please create a random quote generator Java GUI. Please attach all code snippets Your Java GUI should include: ● A text window to show the random quote ● Randomize button to generate quote ● Authorbutton to show who said the quote ● Exit button to exit the program
    Celsius and Fahrenheit Temperature Converter Python program: This must be done using Tkinter Assuming that C is a Celsius temperature, the following formula converts the temperature to Fahrenheit: F = 5/9C +32 Assuming that F is a Fahrenheit temperature, the following formula converts the temperature to Celsius: C = 5/9(F -32) Create an app that allows the user to enter a temperature. The app should have Button components described as follows: A button that reads Convert to Fahrenheit. If the user clicks this button, the app should treat the temperature that is entered as a Celsius temperature and convert it to Fahrenheit. A button that reads Convert to Celsius. If the user clicks this button, the app should treat the temperature that is entered as a Fahrenheit temperature, and convert it to Celsius.
    C# Windows Forms  A company is selling T-shirts. Create an attractive user interface that allows users to select sizes (S, M, L, XL) and quantity. Choose the most appropriate controls. Remember, the fewer keystrokes required of the user the better. Display the selections made by the user with the Process menu option. Include an option to exit the application. Include two more sizes, XSmall and XXLarge. Add statements that process the order by calculating the total cost. Each shirt is $16 except the XSmall and XXLarge; their speciality prices are $20 each Display the total cost of then selection. Include a help option that displays instructions. You can enhance your solution by allowing users to purchase different sizes on the same order.
    • SEE MORE QUESTIONS
    Recommended textbooks for you
  • EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Programming with Microsoft Visual Basic 2017
    Computer Science
    ISBN:9781337102124
    Author:Diane Zak
    Publisher:Cengage Learning
    COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
    Computer Science
    ISBN:9780357392676
    Author:FREUND, Steven
    Publisher:CENGAGE L
  • EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Programming with Microsoft Visual Basic 2017
    Computer Science
    ISBN:9781337102124
    Author:Diane Zak
    Publisher:Cengage Learning
    COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
    Computer Science
    ISBN:9780357392676
    Author:FREUND, Steven
    Publisher:CENGAGE L
    C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
    file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License