(Matrices and File I/O) Write a Python script named cluster_counter.py that takes command line arguments. The first argument will be a filename. The file loaded will contain an n by m matrix of different characters. This n by m matrix denotes different clusters where each same character represents a group. Casing is not important (i.e A and a are the same group). Touching characters (meaning adjacent and diagonal) of the same group are assumed to be in the same cluster. Write a program that tells the user how many groups exist and for each group, how many sub clusters exist. ?(20 points)
Example file test.m
A B A A A
A B A A A
B B A A A
python cluster_counter.py test.m
You have 2 groups: A, B
The Number of clusters are listed below
A : 2
B : 1
全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写Use a Linked List and a set of Derived Classes from a Base Class to demonstrate polymorphism in C++. To do so, alter linked-list source code to run a family of mobile phone derived classes, and create a menu to demonstrate the functionality.? Students are allowed? to work in groups or cohorts. For ease of submission, please e-mail the instructor the members of your cohort before the due date.
The Linked List
Sample code is available to create a linked list on Blackboard.? Alter this code to create a linked list capable of handling the derivation tree of a series of mobile phones. The base class is mobile phone.
全优代写 - 北美Essay代写,Report代写,留学生论文代写作业代写The linked list must be an independent class, and must have the following data and functions:
- MobilePhone * head – a pointer to the first location in the linked list.
- MobilePhone * tail – a pointer to the last location in the linked l