Комментарии:
Code below ;)
import random
def generateRandom(upper):
r = random.randint(1, upper)
return r
def main():
run = True
num1 = generateRandom(10)
num2 = generateRandom(10)
result = num1 * num2
while run:
ans = input("What is " + str(num1) + " x " + str(num2) + "? ")
if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect solution')
else:
print("Input must be a numer")
if _name_ == '__main__':
main()
Thank you very much !! Cheers ! 👋
ОтветитьДякую!
ОтветитьSince you didn't leave the source code here there's no way to run in parallel and learn better (hands on). The explanations are good though.
ОтветитьThank you so much, thats going to save me a ton of time!
Ответитьvery helpful. thank you!
Ответитьit helped me understanding the debug process easily. Its good and simple for newone into PC world. Thank you!
ОтветитьVery good video. What kind of font do you use?
ОтветитьThanks, this was helpful!
Ответитьkopp kop
ОтветитьFinally, no more print statements for debugging
ОтветитьIn short:
Life saver!
Thanks for sharing this.
Thanks for that!
But is there a way to debug the code by blocks like Jupyter Notebook? It would be great if Debugger allowed to go to previous step, and change something. Otherwise, one have to run the whole code again.
THANK YOU
ОтветитьThanks man, it is helpful!
ОтветитьHaha why didn't you use the debugger in your 12 hour coding livestream when you kept opening a socket?
Ответитьpika pika
ОтветитьYeah, but next time you need to zoom in or zoom out the screen while you are explaining or teaching someone, because it's too small while watching your video.
ОтветитьThere's this problem in my Pycharm where when I debug, it says "Variable are not available" even when I already have a breakpoint set on it. The weirdest part is that I am able to debug some functions, but for others, it just says that the variables are not available. I also don't know what difference decides whether the variables can be "available" or not. Can you please help me with this?
ОтветитьAlthough I've used this kind of debugger since way back in the early 1980s with BASIC. However, not all programming languages have good debuggers (and some are overly complicated), if they have a debugger at all. Consequently, most of the time I simply either print debug statements to a console or send debugging text to custom text field.
ОтветитьIs this windows 10
ОтветитьVery helpful. I've been using PyCharm for a while but I hadn't taken the time to look at the debug tool.
Ответитьthanks for this!
ОтветитьAmazing
Ответитьthank you for this
Ответитьgreat tutorial - thanks! 👍
Ответитьthks man
ОтветитьThanks for the video. There are several commands available in Python for Introspection:
dir() will give you the list of in-scope variables
globals() will give you a dictionary of global variables
locals() will give you a dictionary of local variables
good job man keep it up
Ответитьexcellent tutorial, such useful topics (debugging) you mentioned. i had no idea that pycharm was so powerful at debugging.
Ответитьwhen I click on the debug tool it says "connection to python debugger failed, socket closed" and it doesn't let me run the debug. any way to solve that?
ОтветитьWhat are the keyboard shortcuts for step into and step over etc. ?
ОтветитьIncrease font
Ответить# Starting Code:
import random
def generate_random(upper):
"""
:param upper: >= 0
:return: int
"""
r = random.randint(1, upper)
return r
def main():
run = True
num1 = generate_random(10)
num2 = generate_random(10)
result = num1 * num2
while run:
ans = input('What is ' + str(num1) + ' x ' + str(num2) + '? ')
if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect! Try again!')
else:
print("Answer must be a positive number, try again.")
# global vars
times = 10
for x in range(times):
main()
Are there any 3rd part of this Pycharm tutorial?
Ответитьhow can you step into modules's source code written by others? I am using intelliJ and I have not figured out how via settings and google :(
ОтветитьThank you for explaining this stuff. I am new to this and currently in college for computer science and you are helping me tons. Can just one favor is to highlight your mouse points because the background is dark
ОтветитьTim, I simply cannot download pandas for Python 3.9. It gives environment error in my terminal. If you know the cause please let me know. Thanks. Awesome video, by the way.
ОтветитьGreat tool THANKS Tim you da best
ОтветитьVery good tutorial Tim thank you
ОтветитьThanks for this video!
One comment: before making a video please increase the font sizes so it would be readable in smaller screens: File>>Setting>>Font
The voice is cringy😭
Ответитьhello sir i was wondering if you know that setting SecurePreTest in pycharm cuz im tryna prank my friend im tryna prank him by bruteforcing his fb and post clowns hehe please im not doing it for abd stuff e
ОтветитьHere is his starting code:
import random
def generate_random(upper):
"""
:param upper: >= 0
:return: int
"""
r = random.randint(1, upper)
return r
def main():
run = True
num1 = generate_random(10)
num2 = generate_random(10)
result = num1 * num2
while run:
ans = input('What is ' + str(num1) + ' x ' + str(num2) + '? ')
if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect! Try again!')
else:
print("Answer must be a positive number, try again.")
# global vars
times = 10
for x in range(times):
main()
hey, love your videos!
using PyCharm with python 3.8, not getting the comments appearing IN the code, next to the variables when the breakpoint is reached. Please help?
So what’s more efficient, pycharm or python?
Ответить