SlideShare a Scribd company logo
1 of 1
Download to read offline
Python Programming!! Suppose you are given a text file that contains a sequence of floating-
point values, stored one value per line. You need to read the values and write them to a new
output file, aligned in a column and followed by their total and average. If the input file
(input.txt) has the contents: 32.0 54.0 67.5 80.25 115.0 The output file will contain: 32.00 54.00
67.50 80.25 115.00 Total: 348.75 Average: 69.75

More Related Content

More from alfacomputers2

Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdf
Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdfQ1. Imagine a researcher starting work on the obesity epidemic. In t.pdf
Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdfalfacomputers2
 
Q1 What is allocation or absorption The margin allocated to each .pdf
Q1 What is allocation or absorption The margin allocated to each .pdfQ1 What is allocation or absorption The margin allocated to each .pdf
Q1 What is allocation or absorption The margin allocated to each .pdfalfacomputers2
 
Q1 Which white blood cell assists in the regulation of the immune re.pdf
Q1 Which white blood cell assists in the regulation of the immune re.pdfQ1 Which white blood cell assists in the regulation of the immune re.pdf
Q1 Which white blood cell assists in the regulation of the immune re.pdfalfacomputers2
 
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdf
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdfQ1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdf
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdfalfacomputers2
 
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdf
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdfQ.4 Consider the experiment of rolling a pair of dice. Suppose that .pdf
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdfalfacomputers2
 
PyJa Institute is an institute set up to manage the following progra.pdf
PyJa Institute is an institute set up to manage the following progra.pdfPyJa Institute is an institute set up to manage the following progra.pdf
PyJa Institute is an institute set up to manage the following progra.pdfalfacomputers2
 
PurposeMany Americans are very generous donating their time, money.pdf
PurposeMany Americans are very generous donating their time, money.pdfPurposeMany Americans are very generous donating their time, money.pdf
PurposeMany Americans are very generous donating their time, money.pdfalfacomputers2
 
Provide an example of a business that grew too fast. What where the .pdf
Provide an example of a business that grew too fast. What where the .pdfProvide an example of a business that grew too fast. What where the .pdf
Provide an example of a business that grew too fast. What where the .pdfalfacomputers2
 
PurposeDetermining who has the right to claim the dependency exem.pdf
PurposeDetermining who has the right to claim the dependency exem.pdfPurposeDetermining who has the right to claim the dependency exem.pdf
PurposeDetermining who has the right to claim the dependency exem.pdfalfacomputers2
 
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdf
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdfPuello Corporation ha proporcionado los siguientes datos sobre un pr.pdf
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdfalfacomputers2
 
Provided their employers followed the recommended guidelines, which .pdf
Provided their employers followed the recommended guidelines, which .pdfProvided their employers followed the recommended guidelines, which .pdf
Provided their employers followed the recommended guidelines, which .pdfalfacomputers2
 
Provide a reporting information for the POM+ project. MSProject has .pdf
Provide a reporting information for the POM+ project. MSProject has .pdfProvide a reporting information for the POM+ project. MSProject has .pdf
Provide a reporting information for the POM+ project. MSProject has .pdfalfacomputers2
 
Prostitution and solicitation are referred to as victimless crimes. .pdf
Prostitution and solicitation are referred to as victimless crimes. .pdfProstitution and solicitation are referred to as victimless crimes. .pdf
Prostitution and solicitation are referred to as victimless crimes. .pdfalfacomputers2
 
Proporcione una breve historia del desarrollo del federalismo en los.pdf
Proporcione una breve historia del desarrollo del federalismo en los.pdfProporcione una breve historia del desarrollo del federalismo en los.pdf
Proporcione una breve historia del desarrollo del federalismo en los.pdfalfacomputers2
 
Project topic - Development of a Predictive Maintenance System usin.pdf
Project topic - Development of a Predictive Maintenance System usin.pdfProject topic - Development of a Predictive Maintenance System usin.pdf
Project topic - Development of a Predictive Maintenance System usin.pdfalfacomputers2
 
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdf
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdfPROJECT PAPER TOPIC Developing a security policy framework for smal.pdf
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdfalfacomputers2
 
Professor Donald Henderson first pointed out how discussions of ambi.pdf
Professor Donald Henderson first pointed out how discussions of ambi.pdfProfessor Donald Henderson first pointed out how discussions of ambi.pdf
Professor Donald Henderson first pointed out how discussions of ambi.pdfalfacomputers2
 
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdf
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdfProfes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdf
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdfalfacomputers2
 
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdf
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdfProfit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdf
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdfalfacomputers2
 
Process integration addresses the integration of tools where differe.pdf
Process integration addresses the integration of tools where differe.pdfProcess integration addresses the integration of tools where differe.pdf
Process integration addresses the integration of tools where differe.pdfalfacomputers2
 

More from alfacomputers2 (20)

Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdf
Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdfQ1. Imagine a researcher starting work on the obesity epidemic. In t.pdf
Q1. Imagine a researcher starting work on the obesity epidemic. In t.pdf
 
Q1 What is allocation or absorption The margin allocated to each .pdf
Q1 What is allocation or absorption The margin allocated to each .pdfQ1 What is allocation or absorption The margin allocated to each .pdf
Q1 What is allocation or absorption The margin allocated to each .pdf
 
Q1 Which white blood cell assists in the regulation of the immune re.pdf
Q1 Which white blood cell assists in the regulation of the immune re.pdfQ1 Which white blood cell assists in the regulation of the immune re.pdf
Q1 Which white blood cell assists in the regulation of the immune re.pdf
 
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdf
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdfQ1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdf
Q1 Find the (a) mean, (b) median, (c) mode, and (d) midrange for th.pdf
 
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdf
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdfQ.4 Consider the experiment of rolling a pair of dice. Suppose that .pdf
Q.4 Consider the experiment of rolling a pair of dice. Suppose that .pdf
 
PyJa Institute is an institute set up to manage the following progra.pdf
PyJa Institute is an institute set up to manage the following progra.pdfPyJa Institute is an institute set up to manage the following progra.pdf
PyJa Institute is an institute set up to manage the following progra.pdf
 
PurposeMany Americans are very generous donating their time, money.pdf
PurposeMany Americans are very generous donating their time, money.pdfPurposeMany Americans are very generous donating their time, money.pdf
PurposeMany Americans are very generous donating their time, money.pdf
 
Provide an example of a business that grew too fast. What where the .pdf
Provide an example of a business that grew too fast. What where the .pdfProvide an example of a business that grew too fast. What where the .pdf
Provide an example of a business that grew too fast. What where the .pdf
 
PurposeDetermining who has the right to claim the dependency exem.pdf
PurposeDetermining who has the right to claim the dependency exem.pdfPurposeDetermining who has the right to claim the dependency exem.pdf
PurposeDetermining who has the right to claim the dependency exem.pdf
 
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdf
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdfPuello Corporation ha proporcionado los siguientes datos sobre un pr.pdf
Puello Corporation ha proporcionado los siguientes datos sobre un pr.pdf
 
Provided their employers followed the recommended guidelines, which .pdf
Provided their employers followed the recommended guidelines, which .pdfProvided their employers followed the recommended guidelines, which .pdf
Provided their employers followed the recommended guidelines, which .pdf
 
Provide a reporting information for the POM+ project. MSProject has .pdf
Provide a reporting information for the POM+ project. MSProject has .pdfProvide a reporting information for the POM+ project. MSProject has .pdf
Provide a reporting information for the POM+ project. MSProject has .pdf
 
Prostitution and solicitation are referred to as victimless crimes. .pdf
Prostitution and solicitation are referred to as victimless crimes. .pdfProstitution and solicitation are referred to as victimless crimes. .pdf
Prostitution and solicitation are referred to as victimless crimes. .pdf
 
Proporcione una breve historia del desarrollo del federalismo en los.pdf
Proporcione una breve historia del desarrollo del federalismo en los.pdfProporcione una breve historia del desarrollo del federalismo en los.pdf
Proporcione una breve historia del desarrollo del federalismo en los.pdf
 
Project topic - Development of a Predictive Maintenance System usin.pdf
Project topic - Development of a Predictive Maintenance System usin.pdfProject topic - Development of a Predictive Maintenance System usin.pdf
Project topic - Development of a Predictive Maintenance System usin.pdf
 
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdf
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdfPROJECT PAPER TOPIC Developing a security policy framework for smal.pdf
PROJECT PAPER TOPIC Developing a security policy framework for smal.pdf
 
Professor Donald Henderson first pointed out how discussions of ambi.pdf
Professor Donald Henderson first pointed out how discussions of ambi.pdfProfessor Donald Henderson first pointed out how discussions of ambi.pdf
Professor Donald Henderson first pointed out how discussions of ambi.pdf
 
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdf
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdfProfes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdf
Profes�r Rodr�guez redaksiyon �almasn y�r�tt��nde, bask ve bilgisaya.pdf
 
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdf
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdfProfit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdf
Profit Margins and Sustainable Growth The Sandar Co. has a debt�equi.pdf
 
Process integration addresses the integration of tools where differe.pdf
Process integration addresses the integration of tools where differe.pdfProcess integration addresses the integration of tools where differe.pdf
Process integration addresses the integration of tools where differe.pdf
 

Recently uploaded

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Recently uploaded (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

Python Programming!! Suppose you are given a text file that contains.pdf

  • 1. Python Programming!! Suppose you are given a text file that contains a sequence of floating- point values, stored one value per line. You need to read the values and write them to a new output file, aligned in a column and followed by their total and average. If the input file (input.txt) has the contents: 32.0 54.0 67.5 80.25 115.0 The output file will contain: 32.00 54.00 67.50 80.25 115.00 Total: 348.75 Average: 69.75