Question: 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

Writing python program: There are n friends meeting to go on a

Reference function: trip this month, each of them entering their own schedule, Write a

: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!