Posts

Python Exercises for Practice - Exercise 4

Image
  Solution of the Python problem! This is the Question, Python Basic: Exercises, Practice, Solution - w3resource The Input coded by me, Here, I used the List Function count, Syntax <list_name>.count(value). here the value I and want to count is 4 And then I will command print function of PYTHON. I get the Output, It's 2                                                       This solution is by the Owner of the question,            Python Basic: Exercises, Practice, Solution - w3resource Thanks;)                                                                                                                                                                                                                                                                                                             

Python Exercises for Practice - Exercise 3

Image
Solution of the Python problem! Here, I have to make a Dictionary with the help of Python function called Dictionary. It is a Datatype in Python. The problem is made by  https://www.codewithharry.com.                        Here's my code, My Dictionary command to print the code. The output of the code,   Here, I'm offering the User to give Input and will get the output after pressing Enter. Thanks;)

Python Exercises for Practice - Exercise 2

Image
 Solution of the Python problem!  Now, this  is the Question- from   Python Basic: Exercises, Practice, Solution - w3resource Here's the Input which I did (CODE)- So I coded this String inside the Triple Quotation Mark (''' ''') because that gives us exact value (Format of text) as we had given to print. The Output- output of my code Python code by  Python Basic: Exercises, Practice, Solution - w3resource  ðŸ‘‡ print("Twinkle, twinkle, little star, \n\tHow I wonder what you are! \n\t\tUp above the world so high, \n\t\tLike a diamond in the sky. \nTwinkle, twinkle, little star, \n\tHow I wonder what you are!")   Thanks;)

Python Exercises for Practice - Exercise 1

Image
Solution of the Python Problem!    So, I am going to solve the Python problem which was given by the following YOUTUBE CHANNEL Named @programmingwithmosh 1. I did  this myself: For this I used the for Loop with range (range is a function of Python) and one and only print() function. ---- Tha t's kind of Awful I Know😆 . 2. This Solution is by @ programmingwithmosh: EXPLANATION: (JAISE MUJHE LGTA H lol😂) Third line is the Condition of answer. And the first line is Variable for Counting and it's Initial Value is 0. (Cause now we don't know that How many Even numbers we have between 1-10). The forth line is about Increment. (Assignment Operators) It will add the Value of Count i.e.  0 with +1 to the count the Increasing number of Even numbers between 1-10. And the line that is print() function and f function which used when we use numbers between strings (+ Used with {}). 3. Mixture of My Logic and @ programmingwithmosh: Here, I just used 'for loop with range function