I'm definitely interested and i am new to your channel i have been binge watching hoping i can learn how to do coding ❤ Question how long have you been doing this for?
Than you so much for this I've been learning python for some months now and I must say This project helped me think I even noticed a missing piece (Allowing to deposit when balance is empty) and tried doing it on my own and was successful I'm so grateful for this TIM. SO grateful you shared this idea with us.
For any beginners watching this. Here's how I made it easier to break down: 1. Follow the video and code accordingly. 2. Add notes as you go along for yourself (This can be comments in your code) 3. Re-watch the video the day after with paper and/or drawing tablet to re-write each function in pseudo code. - Make sure to listen to his explanations of each function for clarification! - The pseudo code will help you understand how the complicated functions work by allowing you to place in numbers instead of the variable names. 4. Have fun. - Coding is not meant to be hell. Make it fun for yourself, change your environment when you need and remember it's not the end of the world if you don't get something because eventually you will!
I take it your a proffesional...how long from absolute 0 with no IT history will it take to land and python developer/engineering job or AWS software jobs from 0? Im a fast learner just curious of your opinion
Agreed. We have too many language specific tutorials and not enough project structure related tutorial to create actual working programs. So thank you for making this.
I agree, though I felt this tutorial was a bit high paced. I would like to have seen more about the thinking of how to structure the work. Why did we start with the deposit function? it did seem like Tim hade done this problem before hand and just coded it from memory and therefore a few mistakes slipet in. I did enjoy it tho!
that's literally one of the best videos ever for python people who have the basics and are trying to advance to own projects. Keep it up! Subscribed for sure
Yeah, so the best way to dive in for me was I wanted a net currency that excepted every where. Porn. So I built a web scrapper using wget and some logic (where python comes in) so to make it even more valuable I when after porn books (series). So 1 need a menu, 2 need variables, 3 need a fetch method, 4 need a counter(s). 5 need if error don't crash. It was easily hundreds of hours and a lot of polishing. So recent was a python script for a YT downloader, and YT Brute Force downloader (YT doesn't always share all videos) and then Mp4 to Mp3. Now YT is an endless source for Mp3's.
Been a web dev for 7+ years and never really pried into python. This was a great intro to python for me. I get why people like it. Also, props to Tim for being a thorough teacher.
Tim, you are definitely (if not the best) one of the BEST python youtubers out there. I absolutely love your explanations, your thinking process and overall quality of videos. I'm still learning how to effectively use python as a programming language (I am relatively new to programming with text based languages) and to write good and clean code. Thank you so much for these videos and your time put into them. :)
I tried watching this video couple of months back and I had trouble following it because I knew exactly zero code, didn't understand or know the syntax used in the video and it got too much very soon (not to mention boring). Since then I started learning Python and now, although I still can't code anything worthwhile, at least I'm on a level of "I recognize this" when watching you code. This video instantly went from boring and "too much" to interesting and useful for my level of understanding. It actually got me to make some groundbreaking discoveries in a way to look at code when building a program instead of practice scripts that you do when learning a new program. It kind of rounded up the lessons I made in the other course and made me connect the dots. Thank you for that :)
Currently learning Rust following this tutorial. It feels good to feel like you're actually problem solving together with the tutorial and not just copy-pasting code
My issue is never understanding syntax and flow, but rather coming up with what the functions do and how to make them work. But I love working through these kinds of videos!
I think the problem is that a lot of tutorials start or stay very small, almost too small to the point that when you're done with that you don't know what to actually do with it or how to build up on it. This one should help you a lot with it.
Oh my God, I just found your channel recently and it is PERFECT for what I need! I'm in an 'intro to python' class in this last quarter of my 2 year degree in cybersecurity and digital forensics, and another degree in network admin, and am so often just lost in the python material. Our assignment due tomorrow is to write a program for a roulette wheel. How on the nose is this!? Also, answering the whole 'where do I start?' is SOOOO what I need. I can reverse engineer pretty well, and once I've got some groundwork for my code, I can tidy it up and customize it nicely, but when staring at a blank terminal, I NEVER know where/how to start. Thank you SOOOO MUCH for this! I love the way you walk thru stuff, too; not too fast, not too slow. Perfect pacing. Thank you!
You are legend for me in Python tutorials, you have perfect English (easy to understand for a non native like me) and perfect pace to follow along as a beginner.
This was excellent! My biggest issue with learning on various platforms is not understanding how various parts of the code is used in real life, this really helped me. Well done!
Every one who is watching it and have the desire of doing programming tutorials on youtube: this is simple the MOST PERFECT format for a tutorial. This is it. If you follow this style i garante you that you'll have success and people WILL LEARN with you content.
8:15 An interesting point here is that we handle negative numbers with 'if amount > 0', however, negative numbers are already stripped away by 'if amount.isdigit()', since the - sign is not considered a digit, and we always get 'Please enter a number' instead of 'Amount must be greater than 0' for negative numbers. We could use try-except instead: def deposit(): while True: amount = input("What would you like to deposit? $") try: amount = int(amount) if amount > 0: break else: print("Amount must be greater than 0.") except ValueError: print("Please enter a number.") continue return amount We can also put return amount inside of the loop instead of break, but some may argue that's less readable.
I think the reason we are saying amount>0 is because in a real scenario if no money is deposited, they will have 0 money to bet which is why the amount must be greater. Isdigit checks to make sure it is a whole number and also not a negative but it does not exclude 0 from being considered a digit as well.
I like this non-milking and efficient approach to getting a handle on python . It's like you are mentoring us, instead of just teaching us, and milking our time. Thank you.
Being VEEEEEEERY new to python, most of this didn't "make sense" BUT it did at the same time. It doesn't based on me not knowing all the syntax, but your explanation of what exactly each line means did tell a story of how all of this code works together. Great job!
I had a problem coming in over and over. And that is if you played until zero you had no way to quit. So I managed to add ( if answer == "q" or balance == 0: ) Do not wander around endlessly. Thanks for a great video
I know HTML, CSS, SCSS and I learned a little bit of python long ago. Now im coming back to just build projects and fun in python and these videos are absolutely great for it! Thanks Jim for this project, it was very fun even Im not a begginer at coding. Amazing!
bro first and foremost i want to tell you thank you soo much, im going to spend some time on ya channel going through different python situations.. i've been teaching myself for a couple months and this is by far the happiest ive been, reaching the end with no bugs or synax erros.. much love
Very nice intro to Python. Something I would suggest for an upcomming video. - Do a similar type of project but use TDD to develop it. - Move the functions into logical files as to understand how you reference them. - Use a database to store users and account balances ( like a bank ). That will give an overal real world application on how to use Python.
I added return deposit() in the def spin(balance): once your money becomes 0 it will always ask what would you like to bet in each line? if you add return deposit() under the print. it will go back to the def deposit. I really learned a lot on this video and I'm a beginner thank you for this
Hey just wanted to say thank you for your video. It's really good. Straight to the point and very informative. I'm trying to learn to code myself and this is exactly what I need to help me on my journey. Make more videos please. 🙂
I like this video format. Great work and thanks for the upload. 7:11 You can eliminate a bunch of the nesting and make the code more readable by testing for the thing you don't want first. Like this. is_valid_amount = False while not is_valid_amount: amount = input("deposit how many $?") if not amount.isdigit(): print("enter a #") continue amount = int(amount) if amount
@@thefriendlyfoe4488 yeah it's not that what is shown is bad or wrong, but when programs get long it can become very difficult to keep track of what's happening.
Great video. I am beginner python programmer and I was able to follow his code and understand most concepts. I practiced from a 10 hours RUclips video called python for beginners . I moved slowly on the 10 hours video so it took me maybe 5 weeks to complete the 10 hours video and took paper notes. but now I can follow this code and it does not look to difficult to understand. I am staying motivated now - Thanks
I followed along, I made it work. it was fun and easy to follow, now I just need to rewatch while reading through to code to better understand the functions 🔥thanks for the tips
1 hour of learning, totally worth it. This is my first programming lesson in python and i can actually understand what is happening. It saved me a lot of time, because I do not have to go through the usual hours of python lessons. now i can proceed directly to writing code, doing google and stackoverflow.
Finally finished this and used your template pdf to check and fix my errors. Thank you sooooo much. This is life changing, and the way you teach is helping my brain :)
Thank you , thank you and thank you!! This is the kind of videos that makes sense to me based on a challenging project with algorithmic/problem solving process I really hope that you can do more projects like this. And the time of 1 hour is perfect, not too short and not too long Thank you Tim, I have learnt a lot from this one!
After completing my certification in python, i was looking for where to start mastering and implementing the skills i have learnt. This channel and the projects are really helpfull. Am even understand stuff better. Thanks man
Absolutely outstanding tutorial! I appreciate how you get right into things but also take the time to break it down and easily explain why you would use a certain function, command, method, etc. Most other tutorials just drone on and on and I end up falling asleep halfway through, but your teaching style reflects that of someone who understands how some of us could use a well thought out explanation of what does what and why/when you would use it. I have learned more about Python (the core, basic functions) in the first 10 minutes from you than I did with a tutorial course in two days. You got a sub from me.
If anyone was wondering how you can implement a feature to add to your balance after running out or at any time, just edit the "def main() function to this: def main(): balance = deposit() top_up = () while True: print(f"Current balance is ${balance}") answer = input("Press enter to play (q to quit).") if answer == "q": top_up = input("Would you like to top up your balance? (Y/N): " ).upper() if top_up == "Y": top_up_amount = int(input("How much would you like to top by?: ")) if top_up_amount >= 0: balance = top_up_amount + balance else: break else: balance += spin(balance) print(f"You left with ${balance}") main()
I hope this helped anyone out, it took me a decent 10 minutes to figure out but if you line up the if and else, you should be able to make it work, and just follow what the inputs ask, you get the option to top up after you have clicked q to quit fyi.
i broke this project up into a few days, but with the extra time, i could really follow along and absorb the info. awesome video and great teaching format, i actually solved some of my errors on my own too! overall, a project to be proud about as a beginner :)
The cool thing is if you have an idea you can test it out and run it and if it doesnt work, tweek it, if that doesnt work go back to how you had it or look up other peoples code or suggestions to solve your problem. Over time youll learn and remember helpful functions or code you seen and could use.
this is my second time ever learning and working with Python. Even though I didn't understand anything you said as you said it and I basically copied everything you did to get a working Slot Machine, you taught so well. It made me realize how much you REALLY know about coding and how much I have to learn about all the logic itself.
if anyone has older python like me you can replace f-string with .format for example on line 41 i did: print("The amount of your deposit must be between {minb} and {maxb}.".format(minb = MIN_BET, maxb = MAX_BET) ) hope this helps
Thanks so much for This, after several minutes of trying to wrap my head around the code , I later got it . And the game is actually pretty interesting, and more interesting is that it could be applied to solve real life problems thanks a million
Great video, pushes a beginner to the the limit and allows him to learn more 🎉 When I personally attempted this I added a net-winnings tag for each spin, so it’s easier to see how much I made / lost in total! Thanks again Tim!
Oo this is a great idea! I noticed when I played I didn't seem to MAKE any money even if I won the first bet lmao but that must be due to the weightings of the values / winnings
Thanks tim, this helped me a lot, it's just as you said, i've been studying python by a while now and i still have no idea where to begin a project from zero
In the deposit function we need to use .strip() at the input and we don't need to check if the user entered a negative number because if they did the amount.isdigit() condition will fail anyways.
Thank you so much for letting me see your thought process with a project... i had no idea how to even begin thinking about doing a project and this helped a lot.
Tim, You rock MAN!!! This is what I needed to make sense of def and for loops, I'm starting to understand it much better thanks to your great explanation and thought process.. @Demetrius Lewis, YES, 100% we need more videos like this. Tim, THANK YOU! I'm definitely grabbing one of those hoodies 😎
Tim dude you are a monster! You made it look so easy but in reality, when I tried to copy you it was so difficult to do. Anyways, you crushed it! Keep up the great work!
Hey Tim nice work i am fallowing you for quite a while can you please, at this project or at a nother one finish actualy and show how to make an executable file/application .
Bookmarking im doing a fullstack bootcamp and would like to learn python somewhere in-between that. watched the first 5-10mins 10/10 good way to learn with the explanation.
thank you for this! I'm currently going to school for comp sci, and honestly I cant seem to learn how they're teaching me, but this is helping me so much. RUclips needs more people like you!
I enjoyed working through this. I was not able to get the f-string to work right. I checked and am using Python 3.11.1 , I just typed "f", is there another way to get the f-string to work? I was able to work around using int(). Overall, Fantastic lesson! I am very, very new to programming and was able to follow along and understand the content.
Hey, I am having this same issue and was wondering if you had found a resolution for this since then? I googled for a while how to type that "f" for the f-string and had no luck. I'm very new to this as well!
@@juneh5748You just use a regular f character. As long as you include your parenthesis, quotation marks and curly braces (in the appropriate order) then it should work.
I just started learning python. And it looks so easy when I watch you. In the meantime I struggle to write a simple function when I have a description about it. Idk if you could recommend sg to improve my skills with functions. Thank you for the quality content!
Thanks! I was stuck on another little project I was making and this video helped me solve it. The only thing about this slot machine program is, let's say your balance goes to $0 and you mistakenly press Enter when the program asks you if you want to keep playing, you get stuck in a loop because you have no money to bet on. If you reach zero, the program should automatically ask you if you want to enter more money rather than ask you if you want to keep playing.
I didn't understand many things just because i never played at a slot machine... I understood everything for the first 20 minutes then It became tiring
Same! He lost me he started talking about rows and columns, I even Google searched for a slot machine to understand how it worked. It would have been nice to have some drawings to better understand what he did!
37:19 I think it makes more sense to just remove the 'end=""' from the else print statement. This way, if we are not at the end of the row, we print " | " to separate the symbols, but if we are, we print a new line.
Tim, you're really a great teacher but I do have a few complaints about your tutorials 1. Your codes aren't consistent eg. you usually move a lot of codes around, you put them in a new file and/or move codes to different functions or change variables mid-tutorial which makes it hard to keep track of what you're trying to do. 2. also you do not use # or ' ' ' to make codes more readable, I noticed a lot of tutorials who actually give a small title before writing a function so the viewer can keep track of what you are doing, it makes code 10x times more readable. eg. # snake head , # food , # snake movement , # collision impact. It really helps. Overall I think your tutorials are great I just want you to be consistent with what you're writing rather than keep changing things around, try to make a plan first what you exactly want to achieve and then do it (writing all the to-do things as # would really help). Hope you have a good day, thanks for the free tutorials!
While i might agree on most of those for an usual tutorial video of "how to build x or y project", here, it's a tutorial of "how building a program happens irl". You can see that Tim going around in his code, adding function in between other already previous bit of code is closer to the creating process a dev goes through than the building process the program follow step by step to execute correctly. So for this video, it's kind of a moot point and better this way imo.
@@Kai_Ning You can clearly see it says "Learn Python* with only one project" not how to make a game however both have the same meaning. I don't think someone who knows python already would come to a video "Learn Python with xyz" also he didn't specify what he was building in the title. well the most logical thing is people see tutorials and follow it to learn not the other way around. if it was a video like "How to make a website using flask" i would have said I would have been okay with it. for beginners people follow tutorials and if tutorial codes change and has no direction it confuses the viewers
Hey Tim did you mention, that you will never get a line on A's, because you only allow two of them? Besides that its a very good and explaining tutorial to me, you teached me a lot of new features!
I'm having trouble with the function you wrote at 30:12 - The problem seems to with the inner for loop - it never gets to 2 in my code. I don't know enough about how a for loop works in Python, and suspect that it's going to be the equivalent of putting ++i instead of i++ for a control variable. I don't know if you have time to look at my code or not, but would you? I know this was just to see what was on the wheels, but I feel if I'm having trouble with this, then I'm going to have trouble with displaying the result of an actual spin. I commented the area of the code that I have a question about. I'll also list detail on the troubleshooting I did to isolate that it is the for loop.
GET MY FREE SOFTWARE DEVELOPMENT GUIDE👇
training.techwithtim.net/free-guide
I'm definitely interested and i am new to your channel i have been binge watching hoping i can learn how to do coding ❤
Question how long have you been doing this for?
Than you so much for this I've been learning python for some months now and I must say This project helped me think I even noticed a missing piece (Allowing to deposit when balance is empty) and tried doing it on my own and was successful I'm so grateful for this TIM.
SO grateful you shared this idea with us.
60K is low pay just saying
I typed print(“hello world”) then came straight to the advanced shit, like a man
That's a real freedom man pfp
@@Litrary-cheese I did not even print hello world and created a calculator but bit advanced one
all i see is a dead man
@@copdatchoppa Fr
respect
For any beginners watching this. Here's how I made it easier to break down:
1. Follow the video and code accordingly.
2. Add notes as you go along for yourself (This can be comments in your code)
3. Re-watch the video the day after with paper and/or drawing tablet to re-write each function in pseudo code.
- Make sure to listen to his explanations of each function for clarification!
- The pseudo code will help you understand how the complicated functions work by allowing you to place in numbers instead of the variable names.
4. Have fun.
- Coding is not meant to be hell. Make it fun for yourself, change your environment when you need and remember it's not the end of the world if you don't get something because eventually you will!
Thank you for this
I take it your a proffesional...how long from absolute 0 with no IT history will it take to land and python developer/engineering job or AWS software jobs from 0? Im a fast learner just curious of your opinion
Thank you for guiding new programmers.
THIS IS WHAT RUclips NEEDS MORE OF!!! the real process of thinking and working on a project. THANK YOU TIM!
Agreed. We have too many language specific tutorials and not enough project structure related tutorial to create actual working programs. So thank you for making this.
I agree.
I agree, though I felt this tutorial was a bit high paced. I would like to have seen more about the thinking of how to structure the work. Why did we start with the deposit function? it did seem like Tim hade done this problem before hand and just coded it from memory and therefore a few mistakes slipet in.
I did enjoy it tho!
I think it’s probably important to try hard to avoid “paralysis by analysis”
@@joelvoxberg4678 He mentioned he likes to start with user input and that's why he started with the deposit function
Thanks Tim! Truly appreciate your way of teaching. Keep them coming!
Dude!! is the tutorial that good
Oh gosh my dude just donated a 100 bucks !!! Appreciated your love for programming!
@@musicstation-_- this tutorial is worth easily 1000+ but you need to have basic knowledge
Tim didn’t even reply or acknowledge, that’s tuff
@@l3gend272 with a tip that high , Tim probably did it in person
that's literally one of the best videos ever for python people who have the basics and are trying to advance to own projects. Keep it up! Subscribed for sure
I started learning python one week ago, and I was able to follow for most of your tutorial. That’s amazing. You’re an outstanding teacher. THANK YOU!!
I find building projects and learning at the same time is far more enjoyable than just learning without building anytime at all, thank you Tim 🙏🏼❤️
Yeah, so the best way to dive in for me was I wanted a net currency that excepted every where. Porn. So I built a web scrapper using wget and some logic (where python comes in) so to make it even more valuable I when after porn books (series). So 1 need a menu, 2 need variables, 3 need a fetch method, 4 need a counter(s). 5 need if error don't crash. It was easily hundreds of hours and a lot of polishing. So recent was a python script for a YT downloader, and YT Brute Force downloader (YT doesn't always share all videos) and then Mp4 to Mp3. Now YT is an endless source for Mp3's.
@@memphisartguy2 Bro... what?
@@matthewstone2545 😂😂😂
@@matthewstone2545 lol
@@memphisartguy2 💀
Been a web dev for 7+ years and never really pried into python. This was a great intro to python for me. I get why people like it. Also, props to Tim for being a thorough teacher.
Tim, you are definitely (if not the best) one of the BEST python youtubers out there. I absolutely love your explanations, your thinking process and overall quality of videos. I'm still learning how to effectively use python as a programming language (I am relatively new to programming
with text based languages) and to write good and clean code. Thank you so much for these videos and your time put into them. :)
You taught me more than my entire first year of college in an hour…
I tried watching this video couple of months back and I had trouble following it because I knew exactly zero code, didn't understand or know the syntax used in the video and it got too much very soon (not to mention boring). Since then I started learning Python and now, although I still can't code anything worthwhile, at least I'm on a level of "I recognize this" when watching you code. This video instantly went from boring and "too much" to interesting and useful for my level of understanding. It actually got me to make some groundbreaking discoveries in a way to look at code when building a program instead of practice scripts that you do when learning a new program. It kind of rounded up the lessons I made in the other course and made me connect the dots. Thank you for that :)
Currently learning Rust following this tutorial. It feels good to feel like you're actually problem solving together with the tutorial and not just copy-pasting code
My issue is never understanding syntax and flow, but rather coming up with what the functions do and how to make them work. But I love working through these kinds of videos!
yea i hv the same issue too sucks
I think the problem is that a lot of tutorials start or stay very small, almost too small to the point that when you're done with that you don't know what to actually do with it or how to build up on it. This one should help you a lot with it.
I really love that you left your mistakes in! It helps to learn from mistakes as you program because obviously, no one codes perfectly.
Oh my God, I just found your channel recently and it is PERFECT for what I need! I'm in an 'intro to python' class in this last quarter of my 2 year degree in cybersecurity and digital forensics, and another degree in network admin, and am so often just lost in the python material. Our assignment due tomorrow is to write a program for a roulette wheel. How on the nose is this!? Also, answering the whole 'where do I start?' is SOOOO what I need. I can reverse engineer pretty well, and once I've got some groundwork for my code, I can tidy it up and customize it nicely, but when staring at a blank terminal, I NEVER know where/how to start. Thank you SOOOO MUCH for this! I love the way you walk thru stuff, too; not too fast, not too slow. Perfect pacing. Thank you!
I can't believe I actually managed to code a game despite being a novice. His explanation is top notch 🥶
You are legend for me in Python tutorials, you have perfect English (easy to understand for a non native like me) and perfect pace to follow along as a beginner.
This was excellent! My biggest issue with learning on various platforms is not understanding how various parts of the code is used in real life, this really helped me. Well done!
This is so good, it is not annoying, it doesnt bother with some useless info, straight to the point and very clear explanation. Sub from me
Every one who is watching it and have the desire of doing programming tutorials on youtube: this is simple the MOST PERFECT format for a tutorial. This is it. If you follow this style i garante you that you'll have success and people WILL LEARN with you content.
Quality sound and clear on-screen text makes your projects outstanding. Keep it up Tim From Tim
This is exactly what i needed a year ago for my programming class. Hope i pass it this semester
Great job!
Thank you so much!!
8:15 An interesting point here is that we handle negative numbers with 'if amount > 0', however, negative numbers are already stripped away by 'if amount.isdigit()', since the - sign is not considered a digit, and we always get 'Please enter a number' instead of 'Amount must be greater than 0' for negative numbers. We could use try-except instead:
def deposit():
while True:
amount = input("What would you like to deposit? $")
try:
amount = int(amount)
if amount > 0:
break
else:
print("Amount must be greater than 0.")
except ValueError:
print("Please enter a number.")
continue
return amount
We can also put return amount inside of the loop instead of break, but some may argue that's less readable.
Nice catch. I also stumble upon this issue than I moved on with video as I am new to python. This piece of code is great help.
Thank You.
Or you could just say "Please enter a positive number" in all cases and call it done
I think the reason we are saying amount>0 is because in a real scenario if no money is deposited, they will have 0 money to bet which is why the amount must be greater. Isdigit checks to make sure it is a whole number and also not a negative but it does not exclude 0 from being considered a digit as well.
Thank You!
Thanks!
I'm currently taking python beginner course and this project has helped me A LOT! Thank you so much Tim!
I like this non-milking and efficient approach to getting a handle on python . It's like you are mentoring us, instead of just teaching us, and milking our time. Thank you.
It takes a lot of skill and experience to present with this clarity. This is the best "from scratch" introduction to programming that I have seen.
Exactly my point
really bro ??
lol no its not
Being VEEEEEEERY new to python, most of this didn't "make sense" BUT it did at the same time. It doesn't based on me not knowing all the syntax, but your explanation of what exactly each line means did tell a story of how all of this code works together. Great job!
He didn't even check google for answers any time this guy is a genius.
37:15 There is no need for print(), you can just: else: print(column[row]), the EOL will be added automatically when not specifying the seperator
thx this fixed an issue for me ith my rows not lining up correctly
You're the best!!!! Fixed my problems with the not even line up
I found this too!
Thought it was amusing that he went through an extra step that I (a complete noob) had avoided 🤭
I had a problem coming in over and over. And that is if you played until zero you had no way to quit.
So I managed to add ( if answer == "q" or balance == 0: )
Do not wander around endlessly.
Thanks for a great video
im not a fan of using break so i would rather return amount instead at 7:15.
Very impressive to do this from scratch and clear explainaition.
Tim you helped so many people with learning coding. I am truly grateful that there is someone like you.
I know HTML, CSS, SCSS and I learned a little bit of python long ago. Now im coming back to just build projects and fun in python and these videos are absolutely great for it! Thanks Jim for this project, it was very fun even Im not a begginer at coding. Amazing!
Thank you, Tim, I’ve been always struggled with the thinking process but i think now I’m good to go on my own journey.
Step by step learning of the thinking process is super helpful for me, personally. Thank you!!
Great idea for a video format! This was amazing - I'd love to see more at varying levels of difficulty. Thank you Tim!
bro first and foremost i want to tell you thank you soo much, im going to spend some time on ya channel going through different python situations.. i've been teaching myself for a couple months and this is by far the happiest ive been, reaching the end with no bugs or synax erros.. much love
Very nice intro to Python.
Something I would suggest for an upcomming video.
- Do a similar type of project but use TDD to develop it.
- Move the functions into logical files as to understand how you reference them.
- Use a database to store users and account balances ( like a bank ).
That will give an overal real world application on how to use Python.
would love too see that too!
I added return deposit() in the def spin(balance): once your money becomes 0 it will always ask what would you like to bet in each line? if you add return deposit() under the print. it will go back to the def deposit. I really learned a lot on this video and I'm a beginner thank you for this
Hey just wanted to say thank you for your video. It's really good. Straight to the point and very informative. I'm trying to learn to code myself and this is exactly what I need to help me on my journey. Make more videos please. 🙂
I tried to do it IDLE , and it worked !
Thanks Tim you're really helpful
Great video Tim! Please upload more of these, it's very helpful.
Please make a playlist for such video series, that is so much needed
I like this video format. Great work and thanks for the upload.
7:11 You can eliminate a bunch of the nesting and make the code more readable by testing for the thing you don't want first. Like this.
is_valid_amount = False
while not is_valid_amount:
amount = input("deposit how many $?")
if not amount.isdigit(): print("enter a #") continue
amount = int(amount)
if amount
I was thinking that there was something to do to avoid the nesting, nice fix
@@thefriendlyfoe4488 yeah it's not that what is shown is bad or wrong, but when programs get long it can become very difficult to keep track of what's happening.
Great video. I am beginner python programmer and I was able to follow his code and understand most concepts. I practiced from a 10 hours RUclips video called python for beginners . I moved slowly on the 10 hours video so it took me maybe 5 weeks to complete the 10 hours video and took paper notes. but now I can follow this code and it does not look to difficult to understand. I am staying motivated now - Thanks
This was absolutely extraordinary - thank you Tim for all this wonderful work and a great lesson!!
I followed along, I made it work. it was fun and easy to follow, now I just need to rewatch while reading through to code to better understand the functions 🔥thanks for the tips
As a newbie, I'd also love to see how you could make this into a proper app with a window, buttons, animations, etc. Thanks for sharing!
Ohh yes, I would love to know this as well 😅
You have to learn GUI frameworks for this
1 hour of learning, totally worth it. This is my first programming lesson in python and i can actually understand what is happening. It saved me a lot of time, because I do not have to go through the usual hours of python lessons. now i can proceed directly to writing code, doing google and stackoverflow.
Great to watch and listen to. I've learnt a lot from the way you deal with errors - finding what they were and fixing them.
DO u understand what min 24 is about?
Finally finished this and used your template pdf to check and fix my errors. Thank you sooooo much. This is life changing, and the way you teach is helping my brain :)
Thank you , thank you and thank you!! This is the kind of videos that makes sense to me based on a challenging project with algorithmic/problem solving process
I really hope that you can do more projects like this. And the time of 1 hour is perfect, not too short and not too long
Thank you Tim, I have learnt a lot from this one!
After completing my certification in python, i was looking for where to start mastering and implementing the skills i have learnt. This channel and the projects are really helpfull. Am even understand stuff better. Thanks man
Absolutely outstanding tutorial! I appreciate how you get right into things but also take the time to break it down and easily explain why you would use a certain function, command, method, etc. Most other tutorials just drone on and on and I end up falling asleep halfway through, but your teaching style reflects that of someone who understands how some of us could use a well thought out explanation of what does what and why/when you would use it. I have learned more about Python (the core, basic functions) in the first 10 minutes from you than I did with a tutorial course in two days. You got a sub from me.
please do this more often with some intermediate and advance projects you've work on in your career. I am really glad you make this video .Thanks
If anyone was wondering how you can implement a feature to add to your balance after running out or at any time, just edit the "def main() function to this:
def main():
balance = deposit()
top_up = ()
while True:
print(f"Current balance is ${balance}")
answer = input("Press enter to play (q to quit).")
if answer == "q":
top_up = input("Would you like to top up your balance? (Y/N): " ).upper()
if top_up == "Y":
top_up_amount = int(input("How much would you like to top by?: "))
if top_up_amount >= 0:
balance = top_up_amount + balance
else:
break
else:
balance += spin(balance)
print(f"You left with ${balance}")
main()
I hope this helped anyone out, it took me a decent 10 minutes to figure out but if you line up the if and else, you should be able to make it work, and just follow what the inputs ask, you get the option to top up after you have clicked q to quit fyi.
I had a lovely time following along and wrapping my head around the code logic. It was challenging but also a lot of fun 🤩
same here. I found his tutorials very useful and get me interested into Python a lot.
You are just showing how excellent and fast you are in coding. No actual data handling.
i broke this project up into a few days, but with the extra time, i could really follow along and absorb the info. awesome video and great teaching format, i actually solved some of my errors on my own too! overall, a project to be proud about as a beginner :)
The cool thing is if you have an idea you can test it out and run it and if it doesnt work, tweek it, if that doesnt work go back to how you had it or look up other peoples code or suggestions to solve your problem. Over time youll learn and remember helpful functions or code you seen and could use.
This is great! Thanks a lot. Please do more such follow-along projects. It really helps us to understand the logical workflow.
just 18 mins into the video and the way he explains everything with those understandable code, subbbed instantly!!
Nice project bro, simple, easy to follow yet quite a good little project
this is my second time ever learning and working with Python. Even though I didn't understand anything you said as you said it and I basically copied everything you did to get a working Slot Machine, you taught so well. It made me realize how much you REALLY know about coding and how much I have to learn about all the logic itself.
Congrats for 1m subs ❤️🥳🥳
I was going to just listen to this as part of my morning Info soak. 3 minutes in and this is a watch later.
I'll be back.
if anyone has older python like me you can replace f-string with .format
for example on line 41 i did:
print("The amount of your deposit must be between {minb} and {maxb}.".format(minb = MIN_BET, maxb = MAX_BET) )
hope this helps
To make things even more simple you could just do
print("The amount of your deposit must be between {} and {}.".format(MIN_BET, MAX_BET) )
Probably the best programming video I've ever watched. It actually shows the process of creating a program. Thanks!
Thanks so much for This, after several minutes of trying to wrap my head around the code , I later got it . And the game is actually pretty interesting, and more interesting is that it could be applied to solve real life problems thanks a million
It surely had sparked me to create a new project off of the principles!
I watched this video just to see how a real program is structured.....am glad to say this video is really really educational
Great video, pushes a beginner to the the limit and allows him to learn more 🎉
When I personally attempted this I added a net-winnings tag for each spin, so it’s easier to see how much I made / lost in total!
Thanks again Tim!
Oo this is a great idea! I noticed when I played I didn't seem to MAKE any money even if I won the first bet lmao but that must be due to the weightings of the values / winnings
Thanks tim, this helped me a lot, it's just as you said, i've been studying python by a while now and i still have no idea where to begin a project from zero
Okay I'm only 7 minutes in and I already know this video is awesome, because the only thing you've assumed is that I have an IDE. Simply awesome!!
I'm using Codecademy's cloud IDE thing. "Workspaces"
bro you teached me more in an hour than my teacher in 2 years 5th and 6th grade
In the deposit function we need to use .strip() at the input and we don't need to check if the user entered a negative number because if they did the amount.isdigit() condition will fail anyways.
if we don't check if the user entered a negative number our error messages will be less specific
This was the first Python tutorial I've ever been able to successfully finish. Thank you so much.
Thank you so much for letting me see your thought process with a project... i had no idea how to even begin thinking about doing a project and this helped a lot.
Tim, You rock MAN!!! This is what I needed to make sense of def and for loops, I'm starting to understand it much better thanks to your great explanation and thought process.. @Demetrius Lewis, YES, 100% we need more videos like this. Tim, THANK YOU! I'm definitely grabbing one of those hoodies 😎
Great video! Could you also build a GUI to play this game on through Python?
Tim dude you are a monster! You made it look so easy but in reality, when I tried to copy you it was so difficult to do. Anyways, you crushed it! Keep up the great work!
Hey Tim nice work i am fallowing you for quite a while can you please, at this project or at a nother one finish actualy and show how to make an executable file/application .
this is like icecream...it just melts in my brain....sooooo smooth...thankyou!
Great video, thanks!
One thing I would suggest is that you can explain by drawing some complex parts like get_slot_machine_spin.
Bookmarking im doing a fullstack bootcamp and would like to learn python somewhere in-between that. watched the first 5-10mins 10/10 good way to learn with the explanation.
What a nice video. Is there a similar one for c++ out there?
thank you for this! I'm currently going to school for comp sci, and honestly I cant seem to learn how they're teaching me, but this is helping me so much. RUclips needs more people like you!
I enjoyed working through this. I was not able to get the f-string to work right. I checked and am using Python 3.11.1 , I just typed "f", is there another way to get the f-string to work? I was able to work around using int(). Overall, Fantastic lesson! I am very, very new to programming and was able to follow along and understand the content.
Hey, I am having this same issue and was wondering if you had found a resolution for this since then? I googled for a while how to type that "f" for the f-string and had no luck. I'm very new to this as well!
did u find a solution? having the same problem
@@juneh5748You just use a regular f character. As long as you include your parenthesis, quotation marks and curly braces (in the appropriate order) then it should work.
@@Williambubbles thank you!
I just started learning python. And it looks so easy when I watch you. In the meantime I struggle to write a simple function when I have a description about it.
Idk if you could recommend sg to improve my skills with functions.
Thank you for the quality content!
6:00 why not just int(input
Thanks! I was stuck on another little project I was making and this video helped me solve it. The only thing about this slot machine program is, let's say your balance goes to $0 and you mistakenly press Enter when the program asks you if you want to keep playing, you get stuck in a loop because you have no money to bet on. If you reach zero, the program should automatically ask you if you want to enter more money rather than ask you if you want to keep playing.
I didn't understand many things just because i never played at a slot machine... I understood everything for the first 20 minutes then It became tiring
Same! He lost me he started talking about rows and columns, I even Google searched for a slot machine to understand how it worked. It would have been nice to have some drawings to better understand what he did!
Hi Tim, thank you for this video... I'm just a beginner but I was able to understand all your logic and explanation because of way you narrated it
37:19 I think it makes more sense to just remove the 'end=""' from the else print statement. This way, if we are not at the end of the row, we print " | " to separate the symbols, but if we are, we print a new line.
Tim, you're really a great teacher but I do have a few complaints about your tutorials
1. Your codes aren't consistent eg. you usually move a lot of codes around, you put them in a new file and/or move codes to different functions or change variables mid-tutorial which makes it hard to keep track of what you're trying to do.
2. also you do not use # or ' ' ' to make codes more readable, I noticed a lot of tutorials who actually give a small title before writing a function so the viewer can keep track of what you are doing, it makes code 10x times more readable. eg. # snake head , # food , # snake movement , # collision impact. It really helps.
Overall I think your tutorials are great I just want you to be consistent with what you're writing rather than keep changing things around, try to make a plan first what you exactly want to achieve and then do it (writing all the to-do things as # would really help). Hope you have a good day, thanks for the free tutorials!
While i might agree on most of those for an usual tutorial video of "how to build x or y project", here, it's a tutorial of "how building a program happens irl". You can see that Tim going around in his code, adding function in between other already previous bit of code is closer to the creating process a dev goes through than the building process the program follow step by step to execute correctly. So for this video, it's kind of a moot point and better this way imo.
@@Kai_Ning You can clearly see it says "Learn Python* with only one project" not how to make a game however both have the same meaning. I don't think someone who knows python already would come to a video "Learn Python with xyz" also he didn't specify what he was building in the title.
well the most logical thing is people see tutorials and follow it to learn not the other way around. if it was a video like "How to make a website using flask" i would have said I would have been okay with it. for beginners people follow tutorials and if tutorial codes change and has no direction it confuses the viewers
This is an amazing video we need to make this a serie asap !!!
Hey Tim did you mention, that you will never get a line on A's, because you only allow two of them? Besides that its a very good and explaining tutorial to me, you teached me a lot of new features!
Its 2 on each column so it is still possible to get 3 in a line
@@ryansunil4856 Ahh i see my bad. Thank you
Tim, I love your teachings! you are the best!
I'm having trouble with the function you wrote at 30:12 - The problem seems to with the inner for loop - it never gets to 2 in my code. I don't know enough about how a for loop works in Python, and suspect that it's going to be the equivalent of putting ++i instead of i++ for a control variable. I don't know if you have time to look at my code or not, but would you? I know this was just to see what was on the wheels, but I feel if I'm having trouble with this, then I'm going to have trouble with displaying the result of an actual spin. I commented the area of the code that I have a question about. I'll also list detail on the troubleshooting I did to isolate that it is the for loop.
What do you mean by 'never gets to 2' . Had no issues with the code :/