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.
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;)
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 rang...
Comments
Post a Comment