@@rajeshchukka7142 A definition of "joke" - something said or done to provoke laughter or cause amusement, as a witticism, a short and amusing anecdote, or a prankish act
@@harshitbhaihackerxguy Bro you are trying bring such good basics. Wow wonderful and Hats off to your dedication 👏 Try to bring such interesting things in the form of Videos than in the form of Shorts it if is possible 🙏 Thank You so much and All The Best 👍❤️🎉🔥
i thought it was gonna be a super difficult question so i started thinking out of the box. then i realized that he asked for a completely different thing
What you think? What gonna be tough in python 🤣 POV : It can be tough for those who hates maths, if I would have twisted this one to a tough math question of entrance levels
the answer is "hello coder." This is because the sum of a1 is equal to a2 which is 16 so that if it is equal to 16 it will display "Hello Code." as a result of print.
Come on everybody....... Look at the while loop intend....." break " is used inside the" if " condition. If a1=a2 the break will execute...... If break is used inside the while loop intend it will print " hello coder " infinite time unless it met a condition.
Same here. I did a little bit of Python when I started learning about Neural Networks, A.I. Programming and Machine Learning. Similar to you I've come from C/C++ doing 3D Graphics programming. Python is easy to pick up but can be a pain at times due to old C/C++ habits...
Fuck, even with my 5 years of Python experience and my certifications I can't answer this simple addition with a timer in the middle of the screen blocking my view!
5 seconds are also more to this simple question, because I am making the question along with the video, so while I was typing the code you should get the answer there only once I finished writing it.
@@harshitbhaihackerxguy Thats one way of doing it but it's not necessarily gonna be going like this with everyone. Thats one thing a developer has to learn and understand is that all of their clients (in this case, viewers) are different. Adapt.
Just once, as the condition will be true due to the numbers being the same, the condition is True, and it prints the text and then does a *break* exiting the loop and terminating the program, in this case.
I mean, since the timer was in the middle of the screen, I had to guess, and I didn’t think the output would be nothing, so the only other option is “Hello Coder.”
If the person who provides the correct answer to this question is a master of Python, then there must be one million masters in the world as of right now.
It matters whether the break statement is inside If statement or inside while statement If it is inside if statement, No output If it is inside while statement,Hello world
No, it will still only print once. The print statement will be executed on the first iteration within the loop since the condition evaluates to true. Since the break is after the print statement it doesn't matter if the break is within the if block or outside of it at the end of the scope of the while loop. This will still cause it to break from the loop. I'm not 100% sure about Python but I do know that the interpreter is based on C and I know C/C++. Try putting a break or continue statement within a standalone if statement. You should get compiler warnings or errors if break or continue is found outside of either a while or for loop, but this could be implementation dependent from one compiler to the next. Typically break and continue are control flow directives for while and for loops and do not effect if statements. Now, if statements can be used to determine if a break or continue should be called only when you're in a loop.
a1 and a2 are eight so the if statement got True. Because the if statement has == which it returns true when two objects are the same. Of course when if statement has true, it can run the code below it. Which it reaches built-in function called print() and then outputs Hello Coder into terminal/cmd.
Children who are taking their first coding class can answer that. Masters use comprehensions and pythonic syntax like “in” this is for beginners not masters
The code inside the while loop got executed only once because u added the break keyword In other words, the code inside the if statement got executed once but then when the break keyword got executed, we broke out of the while loop Resulting in the code inside the while loop run once
The answer is Hello Coder. Because every 2 variables have the same value. Because they add to a1 A+C+E and A2 has B+D+F and A=B,C=D, E=F. The sum of each variable is equal to the other variable which returns a True expression and prints and outputs "Hello Coder".
That's Will Return Hello Coders cause in this loop returns true and also in if statement also be true after all then U get Hello Coders. Warning ⚠️ - At the end True Breaks so Guys put continue on replacement of break and see magic and do it on your own risk 😅