11:45 you don't need to escape a single apostrophe if the string uses double apostrophes. Likewise, you don't need to escape a double apostrophe if the string uses single apostrophes. For example, print("Glad that's all over!") and print('Glad that"s all over!') will both work. It's only an issue if the string and the escape use the same single- or double-apostrophes. Awesome video BTW!
@cookie1293227 күн бұрын
Thanks
@MassiveMania5 ай бұрын
11:45 no need to escape the apostrophe since it is enclosed in double quotes.
@siavoshoon Жыл бұрын
Just wanted to say thanks for the awesome content on your KZbin channel! I'm learning a lot from you and it's really cool to see kind-hearted people like you out there. Keep up the great work!
@DaveGrayTeachesCode Жыл бұрын
Awesome, thank you!
@VictorChukwuemeka-o3x8 ай бұрын
I like how I am able to solve little problems on my own thanks to your sensible teaching Dave a little progress everyday goes a long way, progress over perfection
@Omer69810 ай бұрын
Thank you for the video. One of the hardest thing about coding for me is the order in which you type things out like you mention in the continue section (3:40) I wish more teachers would focus on that
@7doors847 Жыл бұрын
Amazing Dave! You are relentless 💪 Congrats on the 150k subs, very deserving of such and more.
@DaveGrayTeachesCode Жыл бұрын
Thank you very much!! 🚀🙏
@Nightmare9593516 күн бұрын
FWI, for the print("Value is now equal to " + str(value)) statement could be rewritten as print(f"Value is now equal to: {value}")
@codehound8033Ай бұрын
You are an excellent teacher. Thank you.
@johnaweiss11 ай бұрын
4:35 So, the `else` is executed when the while finishes. `break` will skip past anything in the `else`, correct? Therefore, if there's no break statement in the while loop, then anything in the `else` could be place completely AFTER the entire `while` block -- it will get executed just the same. CORRECT?
@johnaweiss11 ай бұрын
5:18 i believe int's can be printed. I think the problem here is that you tried to CONCAT an int to a string, not that you tried to print an int.
@1conscience0dimension Жыл бұрын
11:56 you don't need to escape the ' print("glad that's over") or print(' another "example" ')
@DaveGrayTeachesCode Жыл бұрын
Sure, but it's not a bad habit to learn as sometimes it is needed and doesn't hurt anything in this case. Reference for escape characters for anyone reading: www.w3schools.com/python/gloss_python_escape_characters.asp
@utinthein7274 Жыл бұрын
Thank you, Sir.
@DaveGrayTeachesCode Жыл бұрын
Welcome!
@adony1800 Жыл бұрын
@@DaveGrayTeachesCode At 3:50. Next time you need to move a line of code you can do it with -> (ALT + UP or DOWN) arrow keys. Also works if you select a block of code.
@utinthein7274 Жыл бұрын
@@DaveGrayTeachesCode 🥰
@muzhaffarhaydar79285 ай бұрын
thanks dave
@alexanderkomanov4151 Жыл бұрын
Thanks Dave!
@DaveGrayTeachesCode Жыл бұрын
Welcome!
@rokib97 Жыл бұрын
"When you use the variable name 'playagain' for both the loop condition and the 'play again' input, declaring the variable with the same name 'playagain,' it is working due to a truthy value. However, is this considered good practice?"
@miedsekadse7136 Жыл бұрын
👍
@PeranMe Жыл бұрын
It’s a little unfortunate to reuse the ”playagain” variable as the input destination. It certainly illustrates that the ”continue” statement doesn’t evaluate the ”while” condition, but it might trip up a beginner in a different situation. Regardless, thoroughly enjoying this series, thanks for sharing!
@DaveGrayTeachesCode Жыл бұрын
It appears I have created some confusion because the "continue" statement goes to the next iteration, but before it starts the iteration, the "while" condition is evaluated. As long as "playagain" has a value that is not False, it is considered to be True. Test this out by assigning a string to a variable. Then make an if statement that says if (variablename): print("This is true") ..it will evaluate as true.
@PeranMe Жыл бұрын
@@DaveGrayTeachesCode Aaahhh…. You’re absolutely right, my bad! See, this is why I watch beginner videos too, despite having used Python for more than 11 years now - there’s always something you’ve missed along the way. Again, thanks!
@willyhorizont8672 Жыл бұрын
dave_upload_video = True while dave_upload_video: if is_video_ends(): break like() comment() if not is_subscribed(): subscribe()