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
"in" keyword in Python April 13, 2022 "in" keyword in Python if "d" in "Adrika" : print ( "Present" ) else : print ( "Not...Read More
"and" and "or" Operator in Python April 12, 2022 "and" and "or" Operator in Python num1 = 10 num2 = 20 if num1 == 10 and num2 == 20 and num1 < num2 : p...Read More
Question/Solution - 3 April 10, 2022Question Make a Simple calculator which will calculate two numbers and ask the numbers and operator from the user. Answer num1 = int ( inpu...Read More