Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON CODE First Code: Write a program that uses a text file to store the days and hours that a user worked in a week.

PYTHON CODE

First Code:

Write a program that uses a text file to store the daysand hours that a user worked in a week. The program should begin by prompting for the number of days worked in the week. It should continue with a loop for input of the days and hours and for writing these to the file, each on its own line.
Sample Output (inputs shown in boldface)
How many days did you work this week? 5
Enter day of week Monday
How many hours did you work on Monday? 10
Enter day of week Tuesday
How many hours did you work on Tuesday? 8
Enter day of week Wednesday
How many hours did you work on Wednesday? 12
Enter day of week Friday
How many hours did you work on Friday? 12
Enter day of week Saturday
How many hours did you work on Saturday? 8
File was created

Second Code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

a neglect of quality in relationship to international competitors;

Answered: 1 week ago