Skip to content

Commit

Permalink
intial commit
Browse files Browse the repository at this point in the history
intial commit
  • Loading branch information
codeperfectplus committed Nov 28, 2019
1 parent da72740 commit 71bd068
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Control Flow/Enumerate_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
x = [5 ,7, 10, 12, 15, 20]
y = [3 ,5, 4, 10, 10, 19]
for x , y in zip(x,y):
print('{} is greater than {}'.format(x,y))
print('%s is greater than %s' %(x,y))

14 changes: 7 additions & 7 deletions MatplotLib/Matplotlib codes in Jupyter notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"metadata": {
"scrolled": true
},
Expand All @@ -64,7 +64,7 @@
"<BarContainer object of 5 artists>"
]
},
"execution_count": 13,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -128,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -159,7 +159,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -200,7 +200,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down
78 changes: 78 additions & 0 deletions Python Basic ++/Count Numbers in list for histogram. py.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
'''
A counter turns a sequence of values into a defaultdict(int)-like object mapping keys to counts. we will use
it to create Histogram
'''
from collections import Counter
document = (10,
1,
10,
5,
7,
4,
1,
1,
10,
10,
9,
10,
1,
3,
9,
9,
4,
1,
8,
6,
7,
3,
6,
7,
3,
10,
5,
3,
10,
4,
6,
8,
10,
5,
5,
9,
10,
8,
10,
9,
10,
10,
8,
7,
7,
10,
8,
6,
4,
6,
1,
9,
10,
2,
3,
3,
9,
2,
3,
8,
1,
7,
3,
10,
6,
6,
9,
6,
7,
9)
word_counts = Counter(document)
for word, count in word_counts.most_common(10):
print('The Number %d Comes %d times ' %(word,count))
19 changes: 19 additions & 0 deletions Python Basic ++/Create random Number and Count Number.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import random
from collections import Counter

#Take User Input for lower and Upper Range For auto Genrare 100 Number
lower_range = int(input('Enter Lower Rnge : ' ))
upper_range = int(input('Enter Upper Range : ' ))

#Create a empty List to Append Random Number to List
list0 = []

#create a random list to Lower range to Upper range
for i in range(100):
x = random.randint(lower_range, upper_range)
list0.append(x)

#count the NUmber most common 5
word_counts = Counter(list0)
for word, count in word_counts.most_common(5):
print('The Number %d Comes %d times ' %(word,count))

0 comments on commit 71bd068

Please sign in to comment.