Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Writing python program: There are n friends meeting to go on a trip this month, each of them entering their own schedule, Write a python

Writing python program:

There are n friends meeting to go on a trip this month, each of them entering their own schedule, Write a python program, count all the available hours for everyone, and print it. When q is input, Output statistical values If no time is available, output: no trip this time

30 days a month '4-5' means 'day4-day5'

Ex:

Input: preson14-511-1218-1925-30 preson215-19 21-28 30-31 preson3: q day: 18 19 25 26 27 28 30

ex.

preson1: 9 preson2: 1-2, 4-6,15-28 preson3:q

image text in transcribed

Reference function: image text in transcribed

: 7~16 18 25~27 : 9~11 24~31 : 1~15 11 25~26 : q 9 10 25 26 : 1 5 6~11 9 : 8 20~31 : 9 12 7 : 11 13~20 : q . : 4~5 11~12 18~19 25~30 : 30~31 21~28 15~19 : q 18 19 25 26 27 28 30 >>> a=[1,2,3,4] >>> a.append([5, 6, 7, 8]) >>> a=[1,2,3,4] >>> a.extend([5, 6, 7, 8]) >>> a >>> a [1, 2, 3, 4, 5, 6, 7, 8] [1, 2, 3, 4, [5, 6, 7, 8]]

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions