diff --git a/README.md b/README.md deleted file mode 100644 index 19f0e78..0000000 --- a/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# PythonProblems -Submit Solutions for Python Problems and Classroom Exercises - - -## Fork this repository and submit your solutions as pull requests for evaluation. For queries and doubts, create a new issue and we will look into it. - -## For Students of ROOT - IT LEARNING CENTRE, TRICHY - -Contact: - -P. Anandkumar - -Mobile: 9790636324 - -Email: root.anand@gmail.com - -www.therootlearning.com - - - diff --git a/SOLUTION b/SOLUTION new file mode 100644 index 0000000..7699e9a --- /dev/null +++ b/SOLUTION @@ -0,0 +1,33 @@ +# FINDING THE MODE OF A DATA SET +a=[] +print("THE DATA SET CAN BE UN-SORTED AND THE ELEMENTS NEED NOT BE UNIQUE") +print("*** **** *** *** ** ********* *** *** ******** **** *** ** ******") +print("PRESS * TO STOP ENETRING ELEMENTS") +print("******* ** **** ******** ********") +n=input("Enter the first element") +while(n!='*'): + y=int(n) + a.append(y) + n=input("Enter the next element") +print("You have eneterd the following set of data:",a) +modes=[] +old_count=0 +new_count=0 +i=0 +evalted=[] +for x in a: + if x in evalted: + pass + else: + new_count=a.count(x) + if old_count