Question/Solution - 7 June 29, 2022 Question l = [ 34 , 0 , - 12 , - 78 , 43 , 0 , 6 , - 1 , 0 , 86 , - 100 , 56 ] # [56, 0, -12, -78, 43, 0, 6, -1, 0, 86, -100, 34] ...Read More
Question/Solution - 6 June 25, 2022 Question l = [ 34 , 0 , - 12 , - 78 , 43 , 0 , 6 , - 1 , 0 , 86 , - 100 , 56 ] # Negative => [-12, -78, -1, -100] # Positive => [34,...Read More
Nested List June 21, 2022 Nested List l = [[ 1 , 2 , 3 ], [ 4 , 5 , 6 ], [ 7 , 8 , 9 ]] print ( len ( l )) print ( l [ 1 ]) print ( l [ 2 ][ 0 ]) for sl in l : ...Read More
Looping on lists June 19, 2022 Looping on Lists lang = [ "Python" , "Java" , "Javascript" , "C++" , "C#" ] for i in ...Read More
Join & Split Function June 17, 2022 Join & Split Function #split function # str ---> list string = "Xtra Coding" print ( string . split ( " " )) # ...Read More
is keyword V/S == June 16, 2022 is keyword V/S == lang1 = [ "Python" , "Java" , "Javascript" ] lang2 = [ "C++" , "Java" ...Read More
List Methods June 14, 2022 List Methods lang = [ "Python" , "Java" , "Javascript" , "C++" , "Java" , "C#"...Read More
Methods to delete data from the lists June 06, 2022 Methods to Delete Data from the Lists string = [ "string1" , "string2" , "string3" , "string2" , ...Read More
Methods to add data to the lists June 05, 2022 Methods to Add Data to the Lists string = [ "string1" , "string2" ] #append string . append ( "string3" ) pr...Read More
Basics of Lists May 21, 2022 Basics of Lists mixed = [ "Xtra" , "Coding" , 14 , 1.6 , True , False ] print ( mixed ) print ( mixed [:: 2 ]) number...Read More
Scope of Variables May 18, 2022Scope of Variables num = 20 # Global variables def test1 (): global num num = 10 # Local variables return num # def ...Read More
Default Parameter May 17, 2022 Default Parameter def add_two ( a , b = 5 ): return ( a + b ) print ( add_two ( 5 ))Read More
Define Greatest May 16, 2022 Define Greatest def greatest ( a , b , c ): if a > b and a > c : print ( a ) else : if b > c : ...Read More
Print Vs Return May 15, 2022 Print Vs Return def add_three ( a , b , c ): print (a+b+c) sum_three = add_three( 2 , 3 , 5 ) print (sum_three) def add_three ( a...Read More
Functions in Python May 07, 2022 Functions in Python def add_two ( a , b ): #Parametre return ( a + b ) print ( add_two ( 2 , 3 )) #ArgumentsRead More
Break and Continue Keyword May 05, 2022 Break & Continue Keyword # Break for i in range ( 1 , 11 ): if i == 5 : break print ( i ) # Continue for ...Read More
Question/Answer - 5 May 03, 2022Question # start - 1 # end - 11 # 1 + 3 + 5 + 7 + 9 + 11 = 36 # Add odd number between the number entered by user(including those number...Read More
For Loop in Python April 28, 2022 For Loop in Python #Prints counting from 0 - 9 for i in range ( 10 ): print ( i ) #Will print odd numbers from 1 - 10 for i i...Read More
Question/Solution-4 April 26, 2022Question # 5 - 120 - example # 5 * 4 * 3 * 2 * 1 # user input - ?? output - factorial of user input ...Read More
While loop in Python April 13, 2022 While loop in Python # "Xtra Coding" - 10times i = 1 while i <= 100 : print ( i ) i += 1Read More
Check Empty or Not in Python April 13, 2022 Check Empty or Not in Python name = " " if name : # condition will be true if string will not be empty print ( "Stri...Read More