From bf27098f89f408808eda2969fa4dc73cc2c921b0 Mon Sep 17 00:00:00 2001 From: Prateek1337 Date: Thu, 24 May 2018 20:18:19 +0530 Subject: [PATCH 1/3] Assignment4 --- .../Week-4/Prateek/Assignment4.txt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Introduction-to-Data-Science/Week-4/Prateek/Assignment4.txt diff --git a/Introduction-to-Data-Science/Week-4/Prateek/Assignment4.txt b/Introduction-to-Data-Science/Week-4/Prateek/Assignment4.txt new file mode 100644 index 0000000..6ff4951 --- /dev/null +++ b/Introduction-to-Data-Science/Week-4/Prateek/Assignment4.txt @@ -0,0 +1,21 @@ +1) +it use to append a binary file + +2) +all file that are opened are loaded into a buffer , it helps in efficient handling and if some error occures in handling orignal file remains safe + +3) +try: + import phones.call +except ImportError : + print("Some Error Ocurred while Imorting") +d={1:'a',2:'b'} +try: + print(d[3]) +except KeyError: + print("Erroe:Key Not Found") + +4) +file1=open("sample.txt","r+") +for line in reversed(list(file1)): + print(line,end="") From 7342e18b26c87ff8497f89ff5e71b3e0ed47cf0c Mon Sep 17 00:00:00 2001 From: Prateek1337 Date: Fri, 25 May 2018 20:02:57 +0530 Subject: [PATCH 2/3] Added Assignment5 --- .../Week-4/Prateek/Assignment5.txt | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Introduction-to-Data-Science/Week-4/Prateek/Assignment5.txt diff --git a/Introduction-to-Data-Science/Week-4/Prateek/Assignment5.txt b/Introduction-to-Data-Science/Week-4/Prateek/Assignment5.txt new file mode 100644 index 0000000..dc525bb --- /dev/null +++ b/Introduction-to-Data-Science/Week-4/Prateek/Assignment5.txt @@ -0,0 +1,71 @@ +1) +A class is group of different data types and funtions that share a common property + +2) +Variable of Class is instance(object) + +3) +Using instance we acess public members of class + +4) +class classname: + #class members + +5) +A method is a piece of code that is called by name that is associated with an object + +6) +self heps to distuinguish different objects of same class + +7) +__init__ method creates and initialize object of class + +8) +using inheritance we donot need to write a method again for child class that already exist in parent class and avoid code duplication + +9) +import random +class card(): + suit={"Hearts":['A',2,3,4,5,6,7,8,9,10,'J','Q','K'],"Diamoond":['A',2,3,4,5,6,7,8,9,10,'J','Q','K'],"Clubs":['A',2,3,4,5,6,7,8,9,10,'J','Q','K'],"Spades":['A',2,3,4,5,6,7,8,9,10,'J','Q','K']} +class deck_of_cards(card): + def shuffled(self): + if(len(card().suit["Hearts"])+len(card().suit["Diamoond"])+len(card().suit["Clubs"])+len(card().suit["Spades"])==52 ): + print("All card present") + for i in card().suit: + random.shuffle(card().suit[i]) + def deal(self,card_suit,card_name): + print("dealt card is ", card_name," of ",card_suit) + card().suit[card_suit].remove(card_name) +#Sample Input: +"""b=card() +a=deck_of_cards() +a.shuffled() +a.deal("Hearts",'A') +print(b.suit)""" + +10) +class person: + def __init__(self,first_name,last_name,phone_number,*email): + self.first_name=first_name + self.last_name=last_name + self.phone_number=phone_number + self.email=email +class address_book(person): + book=[] + def __init__(self,details): + self.add_contact(details) + def add_contact(self,details): + self.book.append(details) + def lookup_contact(self,last_name,first_name="None"): + for i in self.book: + if(first_name=="None"): + if(i.last_name==last_name): + print(i.first_name,i.last_name,i.phone_number,i.email) + else: + if(i.last_name==last_name and i.first_name==first_name): + print(i.first_name,i.last_name,i.phone_number,i.email) +#Sample Input: +#a=person("Prateek","Sahu",9753612488,["ps1337@gmail.com","1337@gmail.com"]) +#address_book(a) +#c=person("anukul","Sahu",9753612488,["ps1337@gmail.com","1337@gmail.com"]) +#address_book(c).lookup_contact("Sahu","anukul") From 05c65709bf30f6594e0f7f462d747fd88b3d3464 Mon Sep 17 00:00:00 2001 From: Prateek1337 Date: Wed, 13 Jun 2018 12:05:24 +0530 Subject: [PATCH 3/3] Sumbitted Pandas_assignment --- .../Prateek/Assignment_pandas.py | 102 ++++++++++++++++++ Introduction-to-Data-Science/README.md | 33 ------ .../Rakesh/Assignment1/assignment1.sh | 12 --- .../Week-1/AdityaGourishetty/Assignment1.sh | 6 -- .../Week-1/AdityaJain/assgn1.sh | 15 --- .../Week-1/Amodh/assignment 1.sh | 7 -- .../Week-1/AmoghSabane/assignment1.sh | 7 -- .../Week-1/Dhruv/assignment1.sh | 9 -- .../Week-1/KRahulReddy/Assignment 1.sh | 22 ---- .../Week-1/KRahulReddy/details.txt | 3 - .../Week-1/KRahulReddy/file.txt | 7 -- .../Week-1/KRahulReddy/temp.txt | 7 -- .../Week-1/Madhumitha/Details.txt | 4 - .../Week-1/Madhumitha/assignment1.sh | 25 ----- .../Week-1/Madhuparna/Assignment1.sh | 10 -- .../Week-1/Niranjan/prog.sh | 10 -- .../Week-1/Ramanan/Assignment1.sh | 7 -- .../Week-1/Ramanan/Details.txt | 3 - .../Week-1/Ramanan/Test.md | 1 - .../Week-1/Ramanan/datasciencecoursera | 1 - .../Week-1/RohitMP/prog1.sh | 12 --- .../Week-1/S.R.Sahith/assg1.sh | 5 - .../Week-1/SAURABH/ASSIGNMENT1.sh | 7 -- .../Week-1/SakshatRao/assignment1.sh | 5 - .../Week-1/Shashank/first.sh | 11 -- .../Week-1/Siddhartha/Assignment1.sh | 5 - .../Week-1/aditya-rastogi/assignment-1.sh | 5 - .../Week-1/chandana/assignment1.sh | 10 -- .../Week-2/AdityaJain/assgn1.txt | 68 ------------ .../Week-2/Amodh/assignment2 | 55 ---------- .../Week-2/AmoghSabane/Assignment2 | 55 ---------- .../Week-2/Animesh_Kumar/assignment_1_2_3.txt | 44 -------- .../Week-2/Animesh_Kumar/del_alternate.py | 5 - .../Week-2/Animesh_Kumar/empty_file.txt | 1 - .../Week-2/Animesh_Kumar/pattern.py | 16 --- .../Week-2/Animesh_Kumar/sort.py | 9 -- .../Week-2/K Rahul Reddy/Assignment 2.txt | 63 ----------- .../Week-2/Madhuparna/Assignment2.txt | 73 ------------- .../Week-2/Ramanan/Assignment2.txt | 55 ---------- .../Week-2/RohitMP/assignment-2.txt | 42 -------- .../assignment_2_data_sciencies.docx | Bin 13759 -> 0 bytes .../Week-2/Shashank/a2.txt | 46 -------- .../Week-2/aditya-rastogi/assignment2 | 47 -------- .../animesh_kumar_assignment_1.sh | 6 -- .../week-2/Prateek/assignment2.txt | 43 -------- 45 files changed, 102 insertions(+), 877 deletions(-) create mode 100644 Introduction-to-Data-Science/Pandas_assignment/Prateek/Assignment_pandas.py delete mode 100644 Introduction-to-Data-Science/README.md delete mode 100644 Introduction-to-Data-Science/Rakesh/Assignment1/assignment1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/AdityaGourishetty/Assignment1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/AdityaJain/assgn1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/Amodh/assignment 1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/AmoghSabane/assignment1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/Dhruv/assignment1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/KRahulReddy/Assignment 1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/KRahulReddy/details.txt delete mode 100644 Introduction-to-Data-Science/Week-1/KRahulReddy/file.txt delete mode 100644 Introduction-to-Data-Science/Week-1/KRahulReddy/temp.txt delete mode 100644 Introduction-to-Data-Science/Week-1/Madhumitha/Details.txt delete mode 100644 Introduction-to-Data-Science/Week-1/Madhumitha/assignment1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/Madhuparna/Assignment1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/Niranjan/prog.sh delete mode 100644 Introduction-to-Data-Science/Week-1/Ramanan/Assignment1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/Ramanan/Details.txt delete mode 100644 Introduction-to-Data-Science/Week-1/Ramanan/Test.md delete mode 160000 Introduction-to-Data-Science/Week-1/Ramanan/datasciencecoursera delete mode 100755 Introduction-to-Data-Science/Week-1/RohitMP/prog1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/S.R.Sahith/assg1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/SAURABH/ASSIGNMENT1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/SakshatRao/assignment1.sh delete mode 100755 Introduction-to-Data-Science/Week-1/Shashank/first.sh delete mode 100644 Introduction-to-Data-Science/Week-1/Siddhartha/Assignment1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/aditya-rastogi/assignment-1.sh delete mode 100644 Introduction-to-Data-Science/Week-1/chandana/assignment1.sh delete mode 100644 Introduction-to-Data-Science/Week-2/AdityaJain/assgn1.txt delete mode 100644 Introduction-to-Data-Science/Week-2/Amodh/assignment2 delete mode 100644 Introduction-to-Data-Science/Week-2/AmoghSabane/Assignment2 delete mode 100644 Introduction-to-Data-Science/Week-2/Animesh_Kumar/assignment_1_2_3.txt delete mode 100644 Introduction-to-Data-Science/Week-2/Animesh_Kumar/del_alternate.py delete mode 100644 Introduction-to-Data-Science/Week-2/Animesh_Kumar/empty_file.txt delete mode 100644 Introduction-to-Data-Science/Week-2/Animesh_Kumar/pattern.py delete mode 100644 Introduction-to-Data-Science/Week-2/Animesh_Kumar/sort.py delete mode 100644 Introduction-to-Data-Science/Week-2/K Rahul Reddy/Assignment 2.txt delete mode 100644 Introduction-to-Data-Science/Week-2/Madhuparna/Assignment2.txt delete mode 100644 Introduction-to-Data-Science/Week-2/Ramanan/Assignment2.txt delete mode 100644 Introduction-to-Data-Science/Week-2/RohitMP/assignment-2.txt delete mode 100644 Introduction-to-Data-Science/Week-2/S.R.Sahith/assignment_2_data_sciencies.docx delete mode 100644 Introduction-to-Data-Science/Week-2/Shashank/a2.txt delete mode 100644 Introduction-to-Data-Science/Week-2/aditya-rastogi/assignment2 delete mode 100644 Introduction-to-Data-Science/animesh_kumar_assignment_1.sh delete mode 100644 Introduction-to-Data-Science/week-2/Prateek/assignment2.txt diff --git a/Introduction-to-Data-Science/Pandas_assignment/Prateek/Assignment_pandas.py b/Introduction-to-Data-Science/Pandas_assignment/Prateek/Assignment_pandas.py new file mode 100644 index 0000000..bb05d0d --- /dev/null +++ b/Introduction-to-Data-Science/Pandas_assignment/Prateek/Assignment_pandas.py @@ -0,0 +1,102 @@ + +# coding: utf-8 + +# In[1]: + + +import pandas as pd +import numpy as np + + +# In[2]: + + +player_match=pd.read_csv("/home/prateek/Documents/Python/Data_science/Data_science_smp/Ipl/DIM_PLAYER_MATCH.csv",encoding="ISO-8859-1",skiprows=[1]) + + +# In[3]: + + +player_match + + +# In[4]: + + +#Q1: +for i in range(2008,2018): + yp=player_match.loc[(player_match.Age_As_on_match<25) & (player_match.Season_year==i)] + lyp=len(yp) + l=len(player_match) + per=(lyp/l)*100 + team=yp.Player_team.value_counts().index[0] + print("% of young players and team having max players in {:d} season={:f} and {}".format(i,per,team)) +yp=player_match.loc[(player_match.Age_As_on_match<25) & (player_match.is_manofThematch==1.0)] +lyp=len(yp) +l=len(player_match) +per=(lyp/l)*100 +print("Percentage of man of the match award won by young player={}".format(per)) + + +# In[11]: + + +#Q2: +def bowl(s): + if(s=="Legbreak" or s=="Legbreak googly"): + s="right-handed leg spin bowler" + return s +player_match.Bowling_skill=player_match.Bowling_skill.map(bowl,na_action="ignore") + +def null(srs): + if(pd.isnull(srs.Bowling_skill)==True): + srs.Bowling_skill=srs.Batting_hand + return srs +player_match=player_match.apply(null,axis="columns") +right=len(player_match.loc[player_match.Bowling_skill.str.contains("right",case=False) & player_match.is_manofThematch==1]) +left=len(player_match.loc[player_match.Bowling_skill.str.contains("left",case=False) & player_match.is_manofThematch==1]) +print("Number of times man of the match recieved by right handed player={} , and left handed player={}".format(right,left)) + + +# In[8]: + + +#Q3: +right_list=list((player_match.loc[player_match.Batting_hand.str.contains("right",case=False) & player_match.is_manofThematch==1]).Player_Name.value_counts().index[0:2]) + +left_list=list((player_match.loc[player_match.Batting_hand.str.contains("left",case=False) & player_match.is_manofThematch==1]).Player_Name.value_counts().index[0:2]) + +keeper=((player_match.loc[((player_match.Role_Desc=="Keeper") | (player_match.Role_Desc=="CaptainKeeper")) & player_match.is_manofThematch==1]).Player_Name.value_counts().index[0]) + + +pacers=list(player_match.loc[((player_match.Bowling_skill.str.contains("fast")) | (player_match.Bowling_skill.str.contains("medium"))) & player_match.is_manofThematch==1].Player_Name.value_counts().index[10:13]) + +A_rounder=(player_match.loc[((player_match.Bowling_skill.str.contains("fast")) | (player_match.Bowling_skill.str.contains("medium"))) & player_match.is_manofThematch==1].Player_Name.value_counts().index[8]) + +spin=list(player_match.loc[((player_match.Bowling_skill.str.contains("break")) | (player_match.Bowling_skill.str.contains("slow")) | (player_match.Bowling_skill.str.contains("spin")) ) & player_match.is_manofThematch==1].Player_Name.value_counts().index[[7,12]]) +#player_match.Bowling_skill.unique() + +type(right_list) +team=right_list+left_list+pacers+spin +#right_list.append(keeper) +team.append(keeper) +team.append(A_rounder) +print("best team is:",team) + + +# In[10]: + + +#Q4: +match=pd.read_excel("/home/prateek/Documents/Python/Data_science/Data_science_smp/Ipl/DIM_MATCH.xlsx",encoding="ISO-8859-1") +match.dropna(axis="index",subset=["match_winner"],inplace=True) +match + +def win_lose(d): + if(d.match_winner!=d.Team1): + d.match_winner=d.match_winner+"-"+d.Team1 + else: + d.match_winner=d.match_winner+"-"+d.Team2 + return d +(match.apply(win_lose,axis="columns")).match_winner.value_counts().index[0] + diff --git a/Introduction-to-Data-Science/README.md b/Introduction-to-Data-Science/README.md deleted file mode 100644 index e5dd563..0000000 --- a/Introduction-to-Data-Science/README.md +++ /dev/null @@ -1,33 +0,0 @@ -## Instructions to submit assignments - -**1) Fork the repository.** - -**2) Clone the forked repo:** - - git clone https://github.com/your-username/SMP18.git - -**3) Change directory and create a folder with your name.** -Inside the folder create a text file with your details. - - cd SMP18 - cd Week- // where X corresponds to the week number - mkdir your-name - cd your-name - -**4) Add and commit changes. Push it to your repository.** - - git add . // adds all files - git commit -m "Your message" - git push origin master - -**5) Login to github and send a pull request to *ISTE-NITK/SMP18**** -To configure upstream: - - git remote add upstream https://github.com/ISTE-NITK/SMP18.git - -To pull the latest changes: - - git fetch upstream - git checkout master - git merge upstream/master - diff --git a/Introduction-to-Data-Science/Rakesh/Assignment1/assignment1.sh b/Introduction-to-Data-Science/Rakesh/Assignment1/assignment1.sh deleted file mode 100644 index dd708e0..0000000 --- a/Introduction-to-Data-Science/Rakesh/Assignment1/assignment1.sh +++ /dev/null @@ -1,12 +0,0 @@ -l=$( < "file.txt" wc -l) -s=$(head -3 file.txt|grep the| wc -l) -q=$(expr "$l" - "3") -d=$(tail -$q file.txt| grep for| wc -l) - -ans=$(expr "$s" \* "$s" + "$d") - -sed -i -e '1,3s/the/it/g' file.txt -sed -i -e '4,$s/for/when/g' file.txt -sort -r file.txt - -echo "$ans" diff --git a/Introduction-to-Data-Science/Week-1/AdityaGourishetty/Assignment1.sh b/Introduction-to-Data-Science/Week-1/AdityaGourishetty/Assignment1.sh deleted file mode 100644 index 5486a6a..0000000 --- a/Introduction-to-Data-Science/Week-1/AdityaGourishetty/Assignment1.sh +++ /dev/null @@ -1,6 +0,0 @@ -read fname -STAR=$(head -3 $fname|grep the|wc -l) -DIAMOND=$(tail -n+4 $fname|grep -e for|wc -l) -cost=`expr \( $STAR \* $STAR \) + $DIAMOND` -sed -e '4,$s/for/when/g' -e '1,3s/the/it/g' $fname|sort -r -echo "cost = $cost" diff --git a/Introduction-to-Data-Science/Week-1/AdityaJain/assgn1.sh b/Introduction-to-Data-Science/Week-1/AdityaJain/assgn1.sh deleted file mode 100755 index 4bbee07..0000000 --- a/Introduction-to-Data-Science/Week-1/AdityaJain/assgn1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -#counting the number of star lines and diamond lines -STLINES=$(head -3 $1|grep -wc "the") -DILINES=$(tail -n +4 $1|grep -wc "for") - -#calculating cost -COST=$(($STLINES*$STLINES+$DILINES)) - -#editing the file -sed -i -e '1,3{s/\/it/g}' -e '4,${s/\/when/g}' $1 - -#printing in reverse sorted order and printing the cost -sort -r $1 -echo $COST diff --git a/Introduction-to-Data-Science/Week-1/Amodh/assignment 1.sh b/Introduction-to-Data-Science/Week-1/Amodh/assignment 1.sh deleted file mode 100755 index 55ba61e..0000000 --- a/Introduction-to-Data-Science/Week-1/Amodh/assignment 1.sh +++ /dev/null @@ -1,7 +0,0 @@ -n=$(wc -l <$1) -n=`expr $n - 3` -star=$(head -3 $1|grep the|wc -l) -diamond=$(tail -$n $1| grep -F 'for'| wc -l) -cost=$(($star*$star +$diamond)) -{ head -3 $1|sed 's/the/it/'; tail -$n $1|sed 's/for/when/' ;} | sort -r -echo cost=$cost diff --git a/Introduction-to-Data-Science/Week-1/AmoghSabane/assignment1.sh b/Introduction-to-Data-Science/Week-1/AmoghSabane/assignment1.sh deleted file mode 100644 index 55ba61e..0000000 --- a/Introduction-to-Data-Science/Week-1/AmoghSabane/assignment1.sh +++ /dev/null @@ -1,7 +0,0 @@ -n=$(wc -l <$1) -n=`expr $n - 3` -star=$(head -3 $1|grep the|wc -l) -diamond=$(tail -$n $1| grep -F 'for'| wc -l) -cost=$(($star*$star +$diamond)) -{ head -3 $1|sed 's/the/it/'; tail -$n $1|sed 's/for/when/' ;} | sort -r -echo cost=$cost diff --git a/Introduction-to-Data-Science/Week-1/Dhruv/assignment1.sh b/Introduction-to-Data-Science/Week-1/Dhruv/assignment1.sh deleted file mode 100755 index 4cb7049..0000000 --- a/Introduction-to-Data-Science/Week-1/Dhruv/assignment1.sh +++ /dev/null @@ -1,9 +0,0 @@ -head -3 $1 | sed 's/the/it/' > output.txt -tail -4 $1 | sed 's/for/when/' >> output.txt -star=$(head -3 $1 | grep "the" | wc -l | bc) -diamond=$(tail -4 $1 | grep "for" | wc -l | bc) -cost=`echo "$star * $star + $diamond"|bc` -sort -r output.txt -echo "cost = $cost" - - diff --git a/Introduction-to-Data-Science/Week-1/KRahulReddy/Assignment 1.sh b/Introduction-to-Data-Science/Week-1/KRahulReddy/Assignment 1.sh deleted file mode 100755 index 3502259..0000000 --- a/Introduction-to-Data-Science/Week-1/KRahulReddy/Assignment 1.sh +++ /dev/null @@ -1,22 +0,0 @@ -#Calculating lines in file -len=$(cat file.txt|wc -l) - -#Value of star -star=$(head -3 file.txt|grep the|wc -l) - -#Value of diamond -tail_len=`expr $len - 3` -diamond=$(tail -$tail_len file.txt|grep for|wc -l) - -a=$(head -3 file.txt|sed 's/the/it/g'|sort -r) - -b=$(tail -$tail_len file.txt|sed 's/for/when/g'|sort -r) - -#make empty file temp.txt to store edited content ->temp.txt - -echo -e "$a\n$b" >> temp.txt - -echo "$(cat temp.txt|sort -r)" -cost=$(expr $star \* $star + $diamond) -echo "Cost = $cost" diff --git a/Introduction-to-Data-Science/Week-1/KRahulReddy/details.txt b/Introduction-to-Data-Science/Week-1/KRahulReddy/details.txt deleted file mode 100644 index 26c942d..0000000 --- a/Introduction-to-Data-Science/Week-1/KRahulReddy/details.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name : K Rahul Reddy -Roll : 17CO119 - diff --git a/Introduction-to-Data-Science/Week-1/KRahulReddy/file.txt b/Introduction-to-Data-Science/Week-1/KRahulReddy/file.txt deleted file mode 100644 index c25f5da..0000000 --- a/Introduction-to-Data-Science/Week-1/KRahulReddy/file.txt +++ /dev/null @@ -1,7 +0,0 @@ -Hello, and good morning to you -the sun is beautifully shining outside -where are the chirping birds -why the mountains look tall -for when the rains come -it will flood the region -and we will be forgiven diff --git a/Introduction-to-Data-Science/Week-1/KRahulReddy/temp.txt b/Introduction-to-Data-Science/Week-1/KRahulReddy/temp.txt deleted file mode 100644 index 2574ce3..0000000 --- a/Introduction-to-Data-Science/Week-1/KRahulReddy/temp.txt +++ /dev/null @@ -1,7 +0,0 @@ -where are it chirping birds -it sun is beautifully shining outside -Hello, and good morning to you -why the mountains look tall -when when the rains come -it will flood the region -and we will be whengiven diff --git a/Introduction-to-Data-Science/Week-1/Madhumitha/Details.txt b/Introduction-to-Data-Science/Week-1/Madhumitha/Details.txt deleted file mode 100644 index 11f5399..0000000 --- a/Introduction-to-Data-Science/Week-1/Madhumitha/Details.txt +++ /dev/null @@ -1,4 +0,0 @@ -Madhumitha Nara -Information Technology -171IT125 -Phone: 7981819450 \ No newline at end of file diff --git a/Introduction-to-Data-Science/Week-1/Madhumitha/assignment1.sh b/Introduction-to-Data-Science/Week-1/Madhumitha/assignment1.sh deleted file mode 100644 index 387ebc0..0000000 --- a/Introduction-to-Data-Science/Week-1/Madhumitha/assignment1.sh +++ /dev/null @@ -1,25 +0,0 @@ -echo "Input: - -" -cat $1 - -echo " - -Output: - -" - -head -3 $1|sed 's/the/it/' > temp -tail -n +4 $1|sed 's/for/when/'>> temp -sort -r temp|cat - -head -3 $1|grep "the"|wc > xxx -read slines swords scharacters sfilename < xxx - -tail -n +4 $1|grep "for"|wc > yyy -read dlines dwords dcharacters dfilename < yyy - -cost=$(echo "scale=2;$slines*$slines+$dlines"|bc) -echo " - -Cost=$cost" diff --git a/Introduction-to-Data-Science/Week-1/Madhuparna/Assignment1.sh b/Introduction-to-Data-Science/Week-1/Madhuparna/Assignment1.sh deleted file mode 100644 index c312527..0000000 --- a/Introduction-to-Data-Science/Week-1/Madhuparna/Assignment1.sh +++ /dev/null @@ -1,10 +0,0 @@ -lines=$( < "file.txt" wc -l) -STAR=$(head -3 file.txt|grep "the"| wc -l) -q=$(expr "$lines" - "3") -DIAMOND=$(tail -$q file.txt| grep "for"| wc -l) -COST=$(expr "$STAR" \* "$STAR") -COST=$(expr "$COST" + "$DIAMOND") -sed -i -e '1,3s/the/it/g' file.txt -sed -i -e '4,$s/for/when/g' file.txt -sort -r file.txt -echo "$COST" diff --git a/Introduction-to-Data-Science/Week-1/Niranjan/prog.sh b/Introduction-to-Data-Science/Week-1/Niranjan/prog.sh deleted file mode 100755 index bb2f9c6..0000000 --- a/Introduction-to-Data-Science/Week-1/Niranjan/prog.sh +++ /dev/null @@ -1,10 +0,0 @@ -star=$(head -3 $1|grep "the"| wc -l) -n=$(grep -c ^ $1) -a=$(expr "$n" - "3") -diam=$(tail -$a $1| grep "for"| wc -l) -c=$(expr "$star" \* "$star") -c=$(expr "$c" + "$diam") -sed -i -e '1,3s/the/it/g' $1 -sed -i -e '4,$s/for/when/g' $1 -sort -r $1 -echo "$c" diff --git a/Introduction-to-Data-Science/Week-1/Ramanan/Assignment1.sh b/Introduction-to-Data-Science/Week-1/Ramanan/Assignment1.sh deleted file mode 100644 index 55ba61e..0000000 --- a/Introduction-to-Data-Science/Week-1/Ramanan/Assignment1.sh +++ /dev/null @@ -1,7 +0,0 @@ -n=$(wc -l <$1) -n=`expr $n - 3` -star=$(head -3 $1|grep the|wc -l) -diamond=$(tail -$n $1| grep -F 'for'| wc -l) -cost=$(($star*$star +$diamond)) -{ head -3 $1|sed 's/the/it/'; tail -$n $1|sed 's/for/when/' ;} | sort -r -echo cost=$cost diff --git a/Introduction-to-Data-Science/Week-1/Ramanan/Details.txt b/Introduction-to-Data-Science/Week-1/Ramanan/Details.txt deleted file mode 100644 index c1d7e06..0000000 --- a/Introduction-to-Data-Science/Week-1/Ramanan/Details.txt +++ /dev/null @@ -1,3 +0,0 @@ -Ramanan R -Civil Engineering -171CV233 diff --git a/Introduction-to-Data-Science/Week-1/Ramanan/Test.md b/Introduction-to-Data-Science/Week-1/Ramanan/Test.md deleted file mode 100644 index b0e6d21..0000000 --- a/Introduction-to-Data-Science/Week-1/Ramanan/Test.md +++ /dev/null @@ -1 +0,0 @@ -##Testing Testing diff --git a/Introduction-to-Data-Science/Week-1/Ramanan/datasciencecoursera b/Introduction-to-Data-Science/Week-1/Ramanan/datasciencecoursera deleted file mode 160000 index 8244a4f..0000000 --- a/Introduction-to-Data-Science/Week-1/Ramanan/datasciencecoursera +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8244a4fd95de3b051d975208969660d068eca7e9 diff --git a/Introduction-to-Data-Science/Week-1/RohitMP/prog1.sh b/Introduction-to-Data-Science/Week-1/RohitMP/prog1.sh deleted file mode 100755 index 7a2a879..0000000 --- a/Introduction-to-Data-Science/Week-1/RohitMP/prog1.sh +++ /dev/null @@ -1,12 +0,0 @@ - -i=$(head -3 $1 | grep the -c) -j=$(tail --lines=+4 $1 | grep for -c) -s=$(echo "$i*$i+$j" | bc) -head -3 $1 | sed 's/the/it/g' > temp1.txt -tail --lines=+4 $1 | sed 's/for/when/g' > temp2.txt -cat temp1.txt temp2.txt | sort -r > $1 -cat $1 -echo "cost = $s" -rm temp1.txt temp2.txt - - diff --git a/Introduction-to-Data-Science/Week-1/S.R.Sahith/assg1.sh b/Introduction-to-Data-Science/Week-1/S.R.Sahith/assg1.sh deleted file mode 100755 index 3d57012..0000000 --- a/Introduction-to-Data-Science/Week-1/S.R.Sahith/assg1.sh +++ /dev/null @@ -1,5 +0,0 @@ -a=$(sed -n '1,3 s/the/it/pg' $1|wc -l) -b=$(sed -n '4,$ s/for/when/pg' $1|wc -l) -sed '1,3 s/the/it/g' $1 |sed '3,$ s/for/when/g'|sort -r -c=`expr $a \* $a + $b` -echo "cost=$c" diff --git a/Introduction-to-Data-Science/Week-1/SAURABH/ASSIGNMENT1.sh b/Introduction-to-Data-Science/Week-1/SAURABH/ASSIGNMENT1.sh deleted file mode 100755 index 0c447d5..0000000 --- a/Introduction-to-Data-Science/Week-1/SAURABH/ASSIGNMENT1.sh +++ /dev/null @@ -1,7 +0,0 @@ -n=$(wc -l < $1) -sed -e '1,3 s/the/it/g' -e "4,$n s/for/when/g" $1|sort -r -j=$(head -3 $1|grep "the"|wc -l) -k=$(tail -4 $1|grep "for"|wc -l) -res=$((($j*$j)+$k)) -echo "cost=$res" - diff --git a/Introduction-to-Data-Science/Week-1/SakshatRao/assignment1.sh b/Introduction-to-Data-Science/Week-1/SakshatRao/assignment1.sh deleted file mode 100755 index 4318ecd..0000000 --- a/Introduction-to-Data-Science/Week-1/SakshatRao/assignment1.sh +++ /dev/null @@ -1,5 +0,0 @@ -star=$(head -3 $1|grep -c 'the') -diamond=$(tail +4 $1|grep -c 'for') -cost=$(echo "scale=1; $star*$star+$diamond"|bc) -(head -3 $1|sed 's/the/it/'; tail +4 $1|sed 's/for/when/')|sort -r -echo "cost = $cost" diff --git a/Introduction-to-Data-Science/Week-1/Shashank/first.sh b/Introduction-to-Data-Science/Week-1/Shashank/first.sh deleted file mode 100755 index bb8c0f4..0000000 --- a/Introduction-to-Data-Science/Week-1/Shashank/first.sh +++ /dev/null @@ -1,11 +0,0 @@ -STAR=$(head -3 $1|grep -i the|wc -l) -li=($(wc -l $1)) -((li=$li - 3)) -DIAMOND=$(tail -$li $1|grep -i for|wc -l) -cost=`expr $STAR \* $STAR + $DIAMOND` -head -3 $1|sed 's/the/it/g' >temp1.txt -tail -$li $1|sed 's/for/when/g' >temp2.txt -cat temp1.txt temp2.txt|sort -r -echo "cost = "$cost - - diff --git a/Introduction-to-Data-Science/Week-1/Siddhartha/Assignment1.sh b/Introduction-to-Data-Science/Week-1/Siddhartha/Assignment1.sh deleted file mode 100644 index 236158c..0000000 --- a/Introduction-to-Data-Science/Week-1/Siddhartha/Assignment1.sh +++ /dev/null @@ -1,5 +0,0 @@ -star=$(head -3 $1|grep -c "the") -dia=$(tail -n +3 $1|grep -c "for") -cat $1|sed '1,3 s/the/it/g'|sed '3,$ s/for/when/g'|sort -r -cost=$(echo "$star * $star + $dia"|bc) -echo "cost = $cost" diff --git a/Introduction-to-Data-Science/Week-1/aditya-rastogi/assignment-1.sh b/Introduction-to-Data-Science/Week-1/aditya-rastogi/assignment-1.sh deleted file mode 100644 index 5c48246..0000000 --- a/Introduction-to-Data-Science/Week-1/aditya-rastogi/assignment-1.sh +++ /dev/null @@ -1,5 +0,0 @@ -s=$(head -3 $1|grep -c "the") -d=$(tail -n +3 $1|grep -c "for") -c=`expr $s \* $s + $d` -cat $1|sed '1,3 s/the/it/g'|sed '3,$ s/for/when/g'|sort -r -echo "cost = $c" diff --git a/Introduction-to-Data-Science/Week-1/chandana/assignment1.sh b/Introduction-to-Data-Science/Week-1/chandana/assignment1.sh deleted file mode 100644 index 321d209..0000000 --- a/Introduction-to-Data-Science/Week-1/chandana/assignment1.sh +++ /dev/null @@ -1,10 +0,0 @@ -lines=$( < "fil.txt" wc -l) -star=$(head -3 file.txt| grep "the"| wc -l) -n=$(expr "$lines" - "3") -diamond=$(tail -$n fil.txt| grep "for"| wc -l) -sed -i -e '1,3s/the/it/g' fil.txt -sed -i -e '4,$s/for/when/g' fil.txt -sort -r fil.txt -x=$(expr "$star" \* "$star") -cost=$(expr "$x" + "$diamond") -echo "$cost" diff --git a/Introduction-to-Data-Science/Week-2/AdityaJain/assgn1.txt b/Introduction-to-Data-Science/Week-2/AdityaJain/assgn1.txt deleted file mode 100644 index bfe4791..0000000 --- a/Introduction-to-Data-Science/Week-2/AdityaJain/assgn1.txt +++ /dev/null @@ -1,68 +0,0 @@ -Q1. Pros - 1. Python is easy to read and easy to learn - 2. It is an Object Oriented Programming language. At the same time it supports Procedural and Functional programming paradigams. - 3. It provides a large collection of standard libraries -Cons - 1. It is slow as it is an interpreted language. - 2. It is not suitable for memory intensive tasks as it has a high memory usage due to its flexibilty. - -Q2. The parentheses () operator has the highest precendence. - -Q3. //-Floor divison operator. It performs divison on the two operands and returns the greatest integer smaller than the - answer of the divison. If any one of the operands is of float type then the returned number is also of float type with - zero as the fractional part. - Eg : 11//6 = 1 - 34.0//5 = 6.0 - -9.0//2 = -5.0 - -Q4. Program to delete alternate elements in a given list - -#!/usr/bin/python3 - -list=[] -n=int(input('No. of elements : ')) - -#Taking user input -print('Input :') -for i in range(0,n) : - list.append(input()) -print('Input list :\n',list) - -del list[1::2] #delete elements using extended slicing. Slice starting from index 1 to the end of the list in steps of 2 - -#printing the new list -print('Edited list :\n',list) - -Q5. Program to sort a given a list - -#!/usr/bin/python3 - -n,temp,list=int(input('Enter no. of elements : ')),0,[] - -#taking user input -print('Input %d integers :'%n) -for i in range(0,n) : - list.append(int(input())) -print('Input : ',list) - -#sorting the list using Insertion Sort -for i in range(1,n) : - j=i-1 - while (list[j+1] < list[j] and j>=0) : - temp=list[j] - list[j]=list[j+1] - list[j+1]=temp - j-=1 - -#printing sorted list -print('Sorted list : ',list) - -Q6. Program to print the given star pattern. - -#!/usr/bin/python3 - -n=int(input('Input n : ')) #taking user input - -#printing the pattern -for i in range(1,n+1) : - print(' '*(n-i),end=("*"*(2*i-1)+"\n")) -for i in range (n-1,0,-1) : - print(' '*(n-i),end=('*'*(2*i-1)+'\n')) diff --git a/Introduction-to-Data-Science/Week-2/Amodh/assignment2 b/Introduction-to-Data-Science/Week-2/Amodh/assignment2 deleted file mode 100644 index 6b6f317..0000000 --- a/Introduction-to-Data-Science/Week-2/Amodh/assignment2 +++ /dev/null @@ -1,55 +0,0 @@ -1. Pros: -a)Python is a high level language -b)It has great readability. -c) It is extremely effective as "glue' code, to join parts coded in different languages. -d)It is very easy to learn and code can be developed much faster. - -Cons: -a) It is very slow to execute. - - -2. Exponentiation operator (**) - - -3. // is called the floor division operator. It basically rounds off the answer we get after dividing to greatest integer lesser than or equal to the answer. -So 10//4=2, not 2.5 - - -4. -print("Enter the list members") -l = input(">>>").split() -ans = [] -for i in l: - if (i not in ans): - ans.append(i) -print("The list without alternate entries is:", end="") -print(ans) - - -5. -print("Enter the list members") -l = input(">>>").split() -for i in range(len(l)-1): - for j in range(len(l)-1-i): - if l[j] > l[j+1]: - l[j], l[j+1] = l[j+1], l[j] -print("The sorted list is:", end="") -print(l) - - -6. -print("Enter n") -n = int(input(">>>")) -for i in range(1,n+1): - for j in range(n-i): - print(end=" ") - for j in range(2*i-1): - print("*",end="") - print() -for i in range(1,n): - for j in range(i): - print(end=" ") - for j in range(2*(n-i)-1): - print("*",end="") - print() - diff --git a/Introduction-to-Data-Science/Week-2/AmoghSabane/Assignment2 b/Introduction-to-Data-Science/Week-2/AmoghSabane/Assignment2 deleted file mode 100644 index 17df5b2..0000000 --- a/Introduction-to-Data-Science/Week-2/AmoghSabane/Assignment2 +++ /dev/null @@ -1,55 +0,0 @@ -A1) -Pros: 1. Code readability - 2. High level - 3. Capable of being used to develp glue code - 4. Less time to develop code - -Cons: 1. Slower to execute - -A2) -Exponentiation operator (**) - -A3) -The 'Floor division' operator outputs only the whole number part of the division operation. For example, 10/4=2.5 whereas 10//4=2. - -A4) -n = input('Input list length ') -list = [] * 100 -for i in range(0,n): - j = input('Input value ') - list.insert(i,j) -for i in range(1,(n/2)+1): - del list[i] -print("The list after deletion of alternate entries is: ") -print list - -A5) -n = input('Input list length ') -list = [] * 100 -for i in range(0,n): - j = input('Input element ') - list.insert(i,j) -for i in range(0,n-1): - for j in range(i+1,n): - if list[i]>list[j]: - temp = list[i] - list[i] = list[j] - list[j] = temp -print("The sorted list is:") -print list - -A6) -n = input('Input n ') -for i in range(1,n+1): - for j in range(0,(2*n)-1-i): - print " ", - for k in range(0,(2*i)-1): - print "*", - print "\n" -for i in range(n-1,0,-1): - for j in range(0,(2*n)-1-i): - print " ", - for k in range(0,(2*i)-1): - print "*", - print "\n" - diff --git a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/assignment_1_2_3.txt b/Introduction-to-Data-Science/Week-2/Animesh_Kumar/assignment_1_2_3.txt deleted file mode 100644 index a363110..0000000 --- a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/assignment_1_2_3.txt +++ /dev/null @@ -1,44 +0,0 @@ -QUESTION 1: - Advantages of Python - -#1-Python is easy to learn for even a novice developer. Its code is easy to read and you can do a lot of things just by looking at it. Also, you can execute a lot of complex functionalities with ease, thanks to the standard library. - -#2- Supports multiple systems and platforms. - -#3- Object Oriented Programming-driven. - -#4- With the introduction of Raspberry Pi, a card sized microcomputer, Python has expanded its reach to unprecedented heights. Developers can now build cameras, radios and games with ease. So, learning Python could open new avenues for you to create some out-of-the box gadgets. - -#5- Python has a plethora of frameworks that make web programming very flexible. Django is the most famous Python framework for web development. - -#6- Gives rise to quick development by using less code. Even a small team can handle Python effectively. - -#7- Allows to scale even the most complex applications with ease. - -#8- A large number of resources are available for Python. - -#9- Offers a built in testing framework to set debugging time and enable fastest workflows. - -#10- IT giants like Yahoo, Google, IBM, NASA, Nokia and Disney prefer Python. - -Disadvantages of Python - -#1- Python is slow. - -#2- Python is not a very good language for mobile development. - -#3- Python is not a good choice for memory intensive tasks. - -#4- It's near impossible to build a high-graphic 3D game using Python. - -#5- Has limitations with database access. - -#6- Python is not good for multi-processor/multi-core work. - -QUESTION 2: -The Exponent operator("**") has the highest priority in an expression - -Question 3: -The // operator is the Floor division operator which does an integer division and gets an integer result, discarding any fractional result. -eg: 7//2 = 3 - diff --git a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/del_alternate.py b/Introduction-to-Data-Science/Week-2/Animesh_Kumar/del_alternate.py deleted file mode 100644 index c0919db..0000000 --- a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/del_alternate.py +++ /dev/null @@ -1,5 +0,0 @@ -s= input("""Enter list elements separated by comma(",")\n""" ) -list_a=list(map(int,s.split(","))) -for i in list_a: - list_a.remove(i) -print(list_a) diff --git a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/empty_file.txt b/Introduction-to-Data-Science/Week-2/Animesh_Kumar/empty_file.txt deleted file mode 100644 index 8b13789..0000000 --- a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/empty_file.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/pattern.py b/Introduction-to-Data-Science/Week-2/Animesh_Kumar/pattern.py deleted file mode 100644 index 18d3b5b..0000000 --- a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/pattern.py +++ /dev/null @@ -1,16 +0,0 @@ -n=int(input("Enter The value of N\n")) -print (n) -for i in range(0,n): - for k in range(n-i-1,0,-1): - print(" ",end="") - for j in range(0,2*i+1): - print("*",end="") - print("\n") -for i in range(n-2,-1,-1): - for k in range(n-1-i,0,-1): - print(" ",end="") - - for j in range(0,2*i+1): - print("*",end="") - print("\n") - diff --git a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/sort.py b/Introduction-to-Data-Science/Week-2/Animesh_Kumar/sort.py deleted file mode 100644 index 0fa8e0c..0000000 --- a/Introduction-to-Data-Science/Week-2/Animesh_Kumar/sort.py +++ /dev/null @@ -1,9 +0,0 @@ -s= input("""Enter list elements separated by comma(",")\n""" ) -a_list=list(map(int,s.split(","))) -n=len(a_list) -for i in range(0,n): - for j in range(0,n-i-1): - if(a_list[j]>a_list[j+1]): - a_list[j],a_list[j+1]=a_list[j+1],a_list[j] - -print(a_list) diff --git a/Introduction-to-Data-Science/Week-2/K Rahul Reddy/Assignment 2.txt b/Introduction-to-Data-Science/Week-2/K Rahul Reddy/Assignment 2.txt deleted file mode 100644 index d3a168c..0000000 --- a/Introduction-to-Data-Science/Week-2/K Rahul Reddy/Assignment 2.txt +++ /dev/null @@ -1,63 +0,0 @@ -1) -Pros: -1. It is easy to read and understand -2. It is an Object oriented programming language -3. It has large standard libraries - -Cons: -1. It is slow -2. It has limitations with database access -3. It is nearly impossible to build high-graphics 3D games - - -2) -Exponential operator(**) - - -3) -// is the floor division operator. It returns the quotient when its operands are divided. Ex: 5//2 = 2 - - -4) -lis = list(input().split(" ")) -n = len(lis) -if(n % 2 == 0): - i = n - 1 -else: - i = n -while i > 0: - del lis[i-1] - i -= 2 -print(lis) - - - -5) -lis = list(input().split(" ")) -n = len(lis) -for i in range (n): - pos = i - for j in range (i + 1, n): - if int(lis[j]) < int(lis[pos]): - pos = j - lis[pos], lis[i] = lis[i], lis[pos] -print(lis) - - - -6) -n = int(input()) -for i in range(n): - m = n - i - 1 - for j in range(m): - print(" ", end = "") - for j in range(2 * i + 1): - print("*", end = "") - print() -for i in range(n - 1): - for j in range(i + 1): - print(" ", end = "") - m = n - i - 1 - for j in range(2 * m - 1): - print("*", end = "") - print() diff --git a/Introduction-to-Data-Science/Week-2/Madhuparna/Assignment2.txt b/Introduction-to-Data-Science/Week-2/Madhuparna/Assignment2.txt deleted file mode 100644 index b4cc908..0000000 --- a/Introduction-to-Data-Science/Week-2/Madhuparna/Assignment2.txt +++ /dev/null @@ -1,73 +0,0 @@ -Q1: -SOLUTION: -pros of python: -1.Easy to code and easy to learn. -2.Lots of resources and Advanced libraries are present in Python . - -cons of Python: -1.It is slow -2.It is not a good choice for memory intensive tasks. - -Q2: -SOLUTION: -The Exponential operator (**) has Highest precedence in an expression. - - -Q3: -SOLUTION: -The operator // is used for floor division. -That is after normal division the floor of the answer is taken. - -Q4: -SOLUTION: -To delete alternate entries of a list -my_list=[1,2,3,4,5,6,7] -s=len(my_list)/2 -for i in range(0 , int(s)): - del my_list[i] - -Q5: -SOLUTION: - -my_list=[3,13,4,1,5,2] -l=len(my_list) -for i in range(0,l): - for j in range(1,l-i): - if my_list[j]list[j]: - temp = list[i] - list[i] = list[j] - list[j] = temp -print("The sorted list is:") -print list - -A6) -n = input('Input n ') -for i in range(1,n+1): - for j in range(0,(2*n)-1-i): - print " ", - for k in range(0,(2*i)-1): - print "*", - print "\n" -for i in range(n-1,0,-1): - for j in range(0,(2*n)-1-i): - print " ", - for k in range(0,(2*i)-1): - print "*", - print "\n" - diff --git a/Introduction-to-Data-Science/Week-2/RohitMP/assignment-2.txt b/Introduction-to-Data-Science/Week-2/RohitMP/assignment-2.txt deleted file mode 100644 index c3da55b..0000000 --- a/Introduction-to-Data-Science/Week-2/RohitMP/assignment-2.txt +++ /dev/null @@ -1,42 +0,0 @@ -1. Pros:It is high-level, interpreted programming language which provides emphas is to code-readability. Code development takes less time as compared to C++ or Java. - Cons:Python code takes more time to execute as compared to C++ or Java. - -2. The exponential operator (**) has the highest precedence in an expression. - -3. The // operator represents floor division. It performs normal division and - then floors the answer and gives the output as an integer. - -4. #Suppose given list is mylist - for i in range(0,len(mylist)): - if(i%2): - print(mylist[i]) - -5. #Suppose given list is mylist - for i in range(0,len(mylist)): - for j in range(1,len(mylist)-i): - if(list[j-1]>list[j]) - temp=list[j-1] - list[j-1]=list[j] - list[j]=temp - -6. -n=input("Enter the value of n\n") -n=int(n) -for i in range(0,n): - for j in range(0,n): - if(i+j>=n-1): - print("*",end="") - else: - print(" ",end="") - for j in range(0,i): - print("*",end="") - print("") -for i in range(0,n-1): - for j in range(0,n): - if(j>i): - print("*",end="") - else: - print(" ",end="") - for j in range(0,n-2-i): - print("*",end="") - print("") diff --git a/Introduction-to-Data-Science/Week-2/S.R.Sahith/assignment_2_data_sciencies.docx b/Introduction-to-Data-Science/Week-2/S.R.Sahith/assignment_2_data_sciencies.docx deleted file mode 100644 index 6be0f70beb6f4d71aa1a6a7eee316c8d7cb2bd5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13759 zcmeHuWmH^Q({AJL7Tn$4-66PJaDqc{cL{WGcMlLWxVyUq5AN;+4Yy~$nL9IiXWe!G zfA8tF_TJs6pXz;1SM7SLb{%DT2uMr-GyoO=0FVM$hG`I;zyN?EC;$Kh01K`s?qKg? zZtr5K?&)amY{2AUXG@X~2~Lv>00({lzsLXLJ5Z-SY~RCz+OBmZEYYDEkr)2u3oJnk zfnMPZ3dx4xKx{oENh~}TmiNmZ5?=TxxiS+>w4qI)!>G{kYlJCll#aAYoG|#v*}3Ql2{rqizH59DMzQ8GE1~t8!xFGk@^M47hJ3g3l&z_@B--N~pu3+?u!}sjQ)vwEJ%87?w8ZiLtcaF)^Ix9eiHep4Cc9p4zf$ zKy8PV82O%_pQW9*+V~nQ^u0%s6#eR1O82OMip36b7zZ^?17 z$nK3Wcwb@O>16janri+H^VbJL=Y_irIx0Swu8jAuJBWDc1@Tx}qYGZ+K<9Rt)J>%5`=z|e>&$clRCE|bYNQA!~tp9>nj96`5&fA6o=P%4LYL;vP1-s zsTw+&+d4Bd{nq~1ME@7t<=-y-Q~Zh?geYRzIn=uGkT3TNJlV|BnoOQM*)c>&+6kCD z@>t<=M|%NDi}K35y_@|}rTL8DjBotK0?<{)I&-;;8Aj6UHXe43Kp176A-(jV_ejzc z)mHWn^UMNqiFpE_Sj+OaYQsb+gvcz|s|)l)hdR_-VhLp7)MDbs@NYkrwR8;LXhEc> zeO}fVhzZ*jgj8i6$gW9+cRWI|^vJKz*$O?%6LXUj54nH6VJ z4$rk=l|OeY@oET+4rPGLgNvBF_HoUG(0zyEvXt*RSjA6Fs>6Wo>-{7iT+3`J1aeyc zX(P2AKtedsnFa^|f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yVf+LC510Qd m{-4YGUuXaznfY(i|6`F?mWKkV7XW|=dVzs7w1n-qcmD^}8ElpS diff --git a/Introduction-to-Data-Science/Week-2/Shashank/a2.txt b/Introduction-to-Data-Science/Week-2/Shashank/a2.txt deleted file mode 100644 index 03557a8..0000000 --- a/Introduction-to-Data-Science/Week-2/Shashank/a2.txt +++ /dev/null @@ -1,46 +0,0 @@ -1) Pros: Programs written in python are easier to read. It is extremely capable of being used as glue code. -Cons: It might take longer to execute. - -2) The **(exponent) operator has highest priority in an expression. - -3) The '//' operator gives the quotient of the two opearnds after truncating the decimal part. It is the floor division operator. - -4) a=[1,2,3,4,5,6,7,8,9,10] -for i in range(1,10,2): - a.remove(i) -print(a) - -5) a=[6,7,8,5,9,0,4,3,1,2] -i=0 -while(i<9): - s=i - j=i+1 - while(j<10): - if(a[s]>a[j]): - s=j - j+=1 - if(s!=i): - temp=a[i] - a[i]=a[s] - a[s]=temp - i+=1 -print(a) - -6) n=input() -n=int(n) -for i in range(0,n): - for j in range(0,n-i): - print(' ',end='') - for j in range(0,i+1): - print('*',end='') - for j in range(0,i): - print('*',end='') - print('\n') -for i in range(n-1,0,-1): - for j in range(n-i,0,-1): - print(' ',end='') - for j in range(i+1,0,-1): - print('*',end='') - for j in range(i,0,-1): - print('*',end='') - print('\n') diff --git a/Introduction-to-Data-Science/Week-2/aditya-rastogi/assignment2 b/Introduction-to-Data-Science/Week-2/aditya-rastogi/assignment2 deleted file mode 100644 index daf56cb..0000000 --- a/Introduction-to-Data-Science/Week-2/aditya-rastogi/assignment2 +++ /dev/null @@ -1,47 +0,0 @@ -1. -Pros: -a)Python is a high level language, works with interpreters and is thus, platform independent. -b)Pyhton is a very easy to learn language. -c)Object oriented programming language, has great benefits with modularity -Cons: -a) It is very slow in execution as compared to c,c++ or java. -b) limitations with database access. -c) extremely difficult to build a high-graphic 3D game using python -2. -exponentiation operator(**) -eg:-2**3=8 -3. -// is the floor division operator. -It is used to give the floor(round down) of the division rounded to the nearest integer below it. eg:- 10//4 = 2 (not 3 or 2.5) -4. -my_list=[int(x) for x in input("enter the list ").split()] -print(len(my_list)) -mylist=[] -for i in range(0,len(my_list)): - if(i%2 is 0): - mylist.append(my_list[i]) -print(mylist) -5. -my_list=[int(x) for x in input("enter the list ").split()] -for i in range (0,len(my_list)-1): - for j in range(0,len(my_list)-1-i): - if(my_list[j]>my_list[j+1]): - my_list[j],my_list[j+1]=my_list[j+1],my_list[j] -print(my_list) -6. -n = input("enter n ") -n= int(n) -for i in range(0,n): - for j in range(0,n): - if(i+jmy_list[j+1]: - my_list[j],my_list[j+1]=my_list[j+1],my_list[j] -print(my_list) - -6) -for i in range(0,n): - for j in range(0,n-i-1): - print(' ',end='') - for k in range(0,2*i+1): - print('*',end='' ) - print() -for i in range(n-1,0,-1): - for j in range(0,n-i): - print(' ',end='') - for k in range(0,2*i-1): - print('*',end='') - print() -