Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please write these two scripts in Python. Link to python.txt file for task 2: https://gofile.io/d/Lje5WI Topic: Lists, Tuples, Sets, Dictionaries, File handling Task

Can someone please write these two scripts in Python.

Link to python.txt file for task 2: https://gofile.io/d/Lje5WI

image text in transcribedimage text in transcribedimage text in transcribed
Topic: Lists, Tuples, Sets, Dictionaries, File handling Task 1. Write a calendar script that can store programs for the next week. The script has to ask if the user wants to store a new program or list the program of a day. All the programs start exactly at 0 minutes (e.g. 10:00, 13:00) and they are exactly one hour long. The programs are stored only in the memory (not in files), so after the script finishes the execution all programs are lost. Use a tuple to understand the days (Monday, Tuesday, ..) and use one list to store the programs. Assume that the user provides everything in the right format (no error handling needed) s - Store program Choose from the list: 1 1 - List daily program Which day?Wednesday x - Exit 0:00 Choose from the list:s 1:00 Which day?Wednesday 2:00 3:00 What time?11 4:00 What is the program? ACIT4420 Lecture 5:00 - Store program 6:00 1 - List daily program 7:00 x - Exit 8:00 Choose from the list:s 9:00 10:06 Which day ?Wednesday 11:00 ACIT4420 Lecture What time?13 12:00 What is the program? ACIT4420 Lab 13:00 ACIT4420 Lab s - Store program 14:0 1 - List daily program 15:00 x - Exit 16:00 Finishing lab exercises 17:00 Choose from the list:s 18:06 Which day?Wednesday 19:00 What time?16 20:00 What is the program? Finishing lab exercises 21:00 s - Store program 1 - List daily program x - ExitTask 2. Write a script that reads the given python. txt textfile and create a statistics about the words used. First read the textfile and remove the unnecessary characters such as comma, full stop, new line, quotation marks, apostrophe. Create a dictionary of word + occurrence pairs and fill it with the words of the text List all the words that are more than 3 times in the text with their occurrences Van : 9 to : 14 has : 5 for : 15 He : 8 Language : 9 of : 9 programming : 7 that : 7 from : 4 worked : 5 he : 13 was : 5 and : 16 is : 7 Dutch : 4 as : 6 his : 7 in : 15 Python : 11 ABC : 5 Rossum : 11 a : 18 In : 7 the : 34\f

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

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Rewrite cos 4x in terms of cos x.

Answered: 1 week ago