From 8b387cc60309d489389d2496d3d1a6ce5bf44491 Mon Sep 17 00:00:00 2001 From: NotAtitYet Date: Sun, 6 Feb 2022 21:14:15 +0530 Subject: [PATCH 1/7] new changes --- Python_Exercises.py | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index d7e6135..402ca82 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -7,6 +7,7 @@ def power(a,b): # ** What is 7 to the power of 4?** + print(a**b) return None @@ -19,6 +20,8 @@ def split_str(s): # s = "Hi there Sam!" # # **into a list. ** + l1=s.split() + print(l1) return None @@ -33,6 +36,7 @@ def format(planet,diameter): # ** Use .format() to print the following string: ** # # The diameter of Earth is 12742 kilometers. + print("The diameter of {} is {} kilometers".format(planet,diameter)) return None @@ -43,6 +47,8 @@ def indexing(lst): # ** Given this nested list, use indexing to grab the word "hello" ** #lst = [1,2,[3,4],[5,[100,200,['hello']],23,11],1,7] + s= lst[3][1][2][0] + print(s) return None @@ -52,7 +58,8 @@ def dictionary(d): # ** Given this nested dictionary grab the word "hello". Be prepared, this will be annoying/tricky ** # d = {'k1':[1,2,3,{'tricky':['oh','man','inception',{'target':[1,2,3,'hello']}]}]} - + s=d['k1'][3]['tricky'][3]['target'][3] + print(s) return None @@ -61,6 +68,7 @@ def subjective(): # ** What is the main difference between a tuple and a list? ** # Tuple is _______ + print("immutable") return None @@ -74,6 +82,8 @@ def domainGet(email): # user@domain.com # # **So for example, passing "user@domain.com" would return: domain.com** + i=email.index('@',0,len(email)-1) + print(email[i+1,len(email)]) return None @@ -81,6 +91,8 @@ def domainGet(email): def findDog(st): # ** Create a basic function that returns True if the word 'dog' is contained in the input string. Don't worry about edge cases like a punctuation being attached to the word dog, but do account for capitalization. ** + flag=st.find('dog') + print(flag!=-1) return None @@ -88,6 +100,7 @@ def findDog(st): def countDog(st): # ** Create a function that counts the number of times the word "dog" occurs in a string. Again ignore edge cases. ** + print(st.count('dog')) return None @@ -102,6 +115,8 @@ def lambdafunc(seq): # **should be filtered down to:** # # ['soup','salad'] + out=filter(lambda var : var[0]=='s',seq) + print(list(out)) return None @@ -114,6 +129,20 @@ def caught_speeding(speed, is_birthday): # If your speed is 60 or less, the result is "No Ticket". If speed is between 61 # and 80 inclusive, the result is "Small Ticket". If speed is 81 or more, the result is "Big Ticket". Unless it is your birthday (encoded as a boolean value in the parameters of the function) -- on your birthday, your speed can be 5 higher in all # cases. ** + if(is_birthday): + if(speed<=65): + print("No ticket") + elif(speed<=85): + print("Small ticket") + else: + print("Big ticket") + else: + if(speed<=60): + print("No ticket") + elif(speed<=80): + print("Small ticket") + else: + print("Big ticket") return None @@ -128,6 +157,8 @@ def create_arr_of_fives(): #### Create an array of 10 fives #### Convert your output into list #### e.g return list(arr) + array=np.ones(10)*5 + print(list(array)) return None @@ -138,7 +169,8 @@ def even_num(): ### Create an array of all the even integers from 10 to 50 ### Convert your output into list ### e.g return list(arr) - + array=np.arange(10,50,2) + print(list(array)) return None From cb920abc9b1c1637d2181b05e1e99aead8468f3c Mon Sep 17 00:00:00 2001 From: NotAtitYet Date: Sun, 6 Feb 2022 22:08:05 +0530 Subject: [PATCH 2/7] new changes --- Python_Exercises.py | 7 ++++--- __pycache__/Python_Exercises.cpython-38.pyc | Bin 0 -> 3246 bytes 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 __pycache__/Python_Exercises.cpython-38.pyc diff --git a/Python_Exercises.py b/Python_Exercises.py index 402ca82..7bc10dc 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -15,7 +15,7 @@ def power(a,b): def split_str(s): - # ** Split this string:** +# ** Split this string:** # # s = "Hi there Sam!" # @@ -36,7 +36,7 @@ def format(planet,diameter): # ** Use .format() to print the following string: ** # # The diameter of Earth is 12742 kilometers. - print("The diameter of {} is {} kilometers".format(planet,diameter)) + print("The diameter of {} is {} kilometers.".format(planet,diameter)) return None @@ -169,7 +169,7 @@ def even_num(): ### Create an array of all the even integers from 10 to 50 ### Convert your output into list ### e.g return list(arr) - array=np.arange(10,50,2) + array=np.arange(10,51,2) print(list(array)) return None @@ -181,6 +181,7 @@ def create_matrix(): ### Convert your output into list ### e.g return (arr).tolist() + return None diff --git a/__pycache__/Python_Exercises.cpython-38.pyc b/__pycache__/Python_Exercises.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ae25274e9a62ecbae8d80fac3102200a9ab2992 GIT binary patch literal 3246 zcmcIm&2Jk;6yMqP$J&XLv`Lz@q^+T!mfE70ZwR5ZfdU6pDJ@7Ls3BN~028pM}xgC9yp7L&xvJc4xv?t4MijI*T07BJ;1``RbnAXo z`q9Q+-E;NJKsCZG%t-XgM~|ecx}glOwRT`D_(rNM14^MXtVvVZkX6B2_s6)oXxwvX z>>B&Vfw3ndu`7Dm6|Vs3blCFTNbx!O2w`k`*YydKicQ5iJ*N^zioFo>`HZYBY*S65 zHRiK4I{UUG#C>0|-ww>4?UGr3eE!~+ERyRqWh7NGs1?86E4m@q4c7~FZ+NX_YG84u z7O18JAFpRxp5x01Jm@YR!Kw-{ei|k5PkzSKJumi85p#Ee@g$guVxgo?vaf)+k2hWJ zu!B16vktqqgJLLd!D*HU&+t_k!4li9Px6uL*RNtQaa($h-8KvT#gHyzbOaJZ11yF( z1}!!l*VPo(#F-xA|nWPB(`etk-D&^fGq z_n754=Qf+|$l3IywmReqW{YNQoDbWZUrX5BmYN=#!6}$Kg(+k1;B|W14K$d+B*+AV zar?+xG!85{!em~NwO}OuHMpk_Dph_aZmMH!eHvBCiqkqA2$%G`d|yw?rsI0CaEAaV zl&1hA{v8>WvA9e56JpU+XQ7XQWp-$=e3S(2fk-YKnGLHC$|}be1@+Ez{J@-44Ul?w z&kQ4Ucusv3OO|J?2KBG{NUXfT#lJ9$gz3pn)kuz`!3k?$kT@8Ql`3MSceB#fppE1u z)H!sH8n*QyEE5L131`Ywm!Q4a17|SG>>%?gtUoc?3kVbt40++ma)!<1T0;q$Ts`tP zOyp#%oCL9d!Ac^wwjDJFcG+{9o8+u)V~0ObjK@n!Pp$1&uPu8))$zg=G?Hl`M5g9? z$UaGqNqKI_S=IVeWR z12XE|XMJ+5>3CkZ>v8^;Tkj1oW4Ln{RX0i#^#=CnaJtg(WGSWILOael%JJ)RfK$E0Q*>S&Bu86rOTXf` zn?GQ108FSA=tqD-H`saFaeUo5`uaH^+H++0Le~R$M3wvKM=T1No<>%Efcjr=Kk2!? zbQDP8ROL_o-81Uuf3f=n$*KzuSAhQKq0O1?N1(G;`uUGJ8R_gt=7G77upw~fUh?6F zVDY2S;dHIuM0IHCV5#@fj2d Date: Sun, 6 Feb 2022 22:13:36 +0530 Subject: [PATCH 3/7] new changes --- Python_Exercises.py | 3 ++- __pycache__/Python_Exercises.cpython-38.pyc | Bin 3246 -> 3255 bytes 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index 7bc10dc..b8c801a 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -82,7 +82,8 @@ def domainGet(email): # user@domain.com # # **So for example, passing "user@domain.com" would return: domain.com** - i=email.index('@',0,len(email)-1) + l=len(email) + i=email.index('@',0,l-1) print(email[i+1,len(email)]) return None diff --git a/__pycache__/Python_Exercises.cpython-38.pyc b/__pycache__/Python_Exercises.cpython-38.pyc index 2ae25274e9a62ecbae8d80fac3102200a9ab2992..ebe13f9bb7bc024f877fd36516ed805685e0f6cd 100644 GIT binary patch delta 676 zcmb7>O=uHA6vt;~ce0bs&c>BS6O7o>Qo3LhuloT7g;aIlwjuxzA!Ub=sAA~&kDDLgii8OMW0GFz;lLt0FIjA z^AM_t&%&;11bh2&GLKt=pfm>G)v1t1{yB#*hY+D{&fqUAv`ss?6X)HSSvp;WbH#e_ z3b&*Cs17&FaJP6}zav#3m}6E@xdyP_t!K~(L$My851L_)faTY$fzHXxW+RE=X z=i!@sviz0eMl+B3riGD<3-m_j65%p|<{rVpU8Z{7&Q{#Jb@~T-|5DfgBX#cgfmCfa z;8$s?HIAB@Cd?2Tgn2|Jlb!ARk4H@}k-AJ+A*>SC2ra@oVFRwYRe0c?sQIdhR#tUo NDNmKqT(pX+`~{93exm>Y delta 635 zcmZ9IJ!lkB5Xax!uiMW{Lgd^F$VJW&77mn4G=yNxnUGvkSO_*+9P92w7H&7m+f6WV zB4U}&DJ(?%Xv9X)#>(1OJ2?A(Jl z8*ja9+MI%sfoBy@-bM`Aa~AVhDfoar83 zlPb0a%1vFQVFI7Drb~vbQscfN8^HC0iCY-wrK;N8RpbmD>I=1LR0E}KAL`NeURDHL zHi6rd@Kd+OVrtS5Osy(%7LCrpwDExN!%O3KEv0N}X;sPcJjRg%9o2_+Usfcgt}^pveWihDIpE?2af$lP$_F(pXcb*cVwZ z+e=@eHu^i6ak&h;)^+C{skBj6fo*Gj%Izna2xTwd2_y00C~3$QEMKcTv51m1?Dx{J z_;@VafkS)4yM)SXwVX#@hHrLj>@(Gj7ILa8yI8g8%Bv{KHNrZLXq$OIiA3IOe+Sp; zIw#Wp|Mc9SV`iS*g5S=$%?8=b5M~LqQaO(p>iFcHgV8KYq%IS#5LO5sLYJ^f*n+2) N5BJ>$_u!f9{{ymLfp`D_ From 18f62a5ac0be207edbe85355d11116bd333bb298 Mon Sep 17 00:00:00 2001 From: NotAtitYet Date: Sun, 6 Feb 2022 22:14:14 +0530 Subject: [PATCH 4/7] new changes --- Python_Exercises.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index b8c801a..0b47c66 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -84,7 +84,7 @@ def domainGet(email): # **So for example, passing "user@domain.com" would return: domain.com** l=len(email) i=email.index('@',0,l-1) - print(email[i+1,len(email)]) + print(email[i+1,l]) return None From b4fafc7b21e98cf8f64b3c67d589ea34f021f4b7 Mon Sep 17 00:00:00 2001 From: NotAtitYet Date: Mon, 7 Feb 2022 00:12:37 +0530 Subject: [PATCH 5/7] new changes --- Python_Exercises.py | 88 ++++++++++---------- __pycache__/Python_Exercises.cpython-38.pyc | Bin 3255 -> 3488 bytes 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index 0b47c66..85ed667 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -4,10 +4,13 @@ # Answer the questions or complete the tasks outlined in bold below. +from re import L + + def power(a,b): # ** What is 7 to the power of 4?** - print(a**b) + return a**b return None @@ -21,9 +24,8 @@ def split_str(s): # # **into a list. ** l1=s.split() - print(l1) - return None + return l1 def format(planet,diameter): @@ -36,9 +38,9 @@ def format(planet,diameter): # ** Use .format() to print the following string: ** # # The diameter of Earth is 12742 kilometers. - print("The diameter of {} is {} kilometers.".format(planet,diameter)) + l="The diameter of {} is {} kilometers.".format(planet,diameter) - return None + return l @@ -48,9 +50,8 @@ def indexing(lst): #lst = [1,2,[3,4],[5,[100,200,['hello']],23,11],1,7] s= lst[3][1][2][0] - print(s) - return None + return s def dictionary(d): @@ -59,18 +60,16 @@ def dictionary(d): # d = {'k1':[1,2,3,{'tricky':['oh','man','inception',{'target':[1,2,3,'hello']}]}]} s=d['k1'][3]['tricky'][3]['target'][3] - print(s) - return None + return s def subjective(): # ** What is the main difference between a tuple and a list? ** # Tuple is _______ - print("immutable") - return None + return "immutable" @@ -83,27 +82,27 @@ def domainGet(email): # # **So for example, passing "user@domain.com" would return: domain.com** l=len(email) - i=email.index('@',0,l-1) - print(email[i+1,l]) + i=email.index('@') + s=email[i+1:l] - return None + return s def findDog(st): # ** Create a basic function that returns True if the word 'dog' is contained in the input string. Don't worry about edge cases like a punctuation being attached to the word dog, but do account for capitalization. ** flag=st.find('dog') - print(flag!=-1) + t=flag!=-1 - return None + return t def countDog(st): # ** Create a function that counts the number of times the word "dog" occurs in a string. Again ignore edge cases. ** - print(st.count('dog')) + count=st.count('dog') - return None + return count @@ -117,9 +116,8 @@ def lambdafunc(seq): # # ['soup','salad'] out=filter(lambda var : var[0]=='s',seq) - print(list(out)) - return None + return list(out) def caught_speeding(speed, is_birthday): @@ -130,22 +128,21 @@ def caught_speeding(speed, is_birthday): # If your speed is 60 or less, the result is "No Ticket". If speed is between 61 # and 80 inclusive, the result is "Small Ticket". If speed is 81 or more, the result is "Big Ticket". Unless it is your birthday (encoded as a boolean value in the parameters of the function) -- on your birthday, your speed can be 5 higher in all # cases. ** - if(is_birthday): + if(is_birthday==True): if(speed<=65): - print("No ticket") + s= "No Ticket" elif(speed<=85): - print("Small ticket") + s= "Small Ticket" else: - print("Big ticket") + s= "Big Ticket" else: if(speed<=60): - print("No ticket") + s= "No Ticket" elif(speed<=80): - print("Small ticket") + s= "Small Ticket" else: - print("Big ticket") - - return None + s= "Big Ticket" + return s ## Numpy Exercises @@ -159,9 +156,9 @@ def create_arr_of_fives(): #### Convert your output into list #### e.g return list(arr) array=np.ones(10)*5 - print(list(array)) + lis=list(array) - return None + return lis @@ -171,8 +168,8 @@ def even_num(): ### Convert your output into list ### e.g return list(arr) array=np.arange(10,51,2) - print(list(array)) - return None + lis=list(array) + return lis @@ -181,9 +178,9 @@ def create_matrix(): ### Create a 3x3 matrix with values ranging from 0 to 8 ### Convert your output into list ### e.g return (arr).tolist() - - - return None + arr=np.arange(0,9,1).reshape(3,3) + lis=arr.tolist() + return lis @@ -192,8 +189,8 @@ def linear_space(): ### Create an array of 20 linearly spaced points between 0 and 1 ### Convert your output into list ### e.g return list(arr) - - return None + arr=np.linspace(0,1,20) + return list(arr) @@ -202,8 +199,9 @@ def decimal_mat(): ### Create an array of size 10*10 consisting of numbers from 0.01 to 1 ### Convert your output into list ### e.g return (arr).tolist() - - return None + arr=np.linspace(0.01,1.,100).reshape(10,10) + print(arr.tolist()) + return arr.tolist() @@ -223,8 +221,10 @@ def slices_1(): # array([[12, 13, 14, 15], # [17, 18, 19, 20], # [22, 23, 24, 25]]) + slice=arr[2:5,1:5] + - return None + return slice.tolist() @@ -244,8 +244,9 @@ def slices_2(): # array([[ 2], # [ 7], # [12]]) + slice=arr[0:3,1:2] - return None + return slice.tolist() @@ -264,8 +265,9 @@ def slices_3(): ### e.g return (arr).tolist() # array([[16, 17, 18, 19, 20], # [21, 22, 23, 24, 25]]) + slice=arr[3:5] - return None + return slice.tolist() # Great job! diff --git a/__pycache__/Python_Exercises.cpython-38.pyc b/__pycache__/Python_Exercises.cpython-38.pyc index ebe13f9bb7bc024f877fd36516ed805685e0f6cd..7d034bd66db16ea630b11c53bf1414c0649d56b1 100644 GIT binary patch literal 3488 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 Date: Mon, 7 Feb 2022 07:56:51 +0530 Subject: [PATCH 6/7] Update Python_Exercises.py --- Python_Exercises.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index 85ed667..a203f09 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -199,8 +199,7 @@ def decimal_mat(): ### Create an array of size 10*10 consisting of numbers from 0.01 to 1 ### Convert your output into list ### e.g return (arr).tolist() - arr=np.linspace(0.01,1.,100).reshape(10,10) - print(arr.tolist()) + arr=np.around(linspace(0.01,1.,100),decimals=2).reshape(10,10) return arr.tolist() From 3f6377502bb8c6d7382385361507950ea26d9dc3 Mon Sep 17 00:00:00 2001 From: Kumar Sonu <98336135+NotAtitYet@users.noreply.github.com> Date: Tue, 8 Feb 2022 13:19:18 +0530 Subject: [PATCH 7/7] Update Python_Exercises.py --- Python_Exercises.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python_Exercises.py b/Python_Exercises.py index a203f09..03e08cd 100644 --- a/Python_Exercises.py +++ b/Python_Exercises.py @@ -199,7 +199,7 @@ def decimal_mat(): ### Create an array of size 10*10 consisting of numbers from 0.01 to 1 ### Convert your output into list ### e.g return (arr).tolist() - arr=np.around(linspace(0.01,1.,100),decimals=2).reshape(10,10) + arr=np.around(np.linspace(0.01,1.,100),decimals=2).reshape(10,10) return arr.tolist()