A Beginner's Guide to Python Programming

A Beginner's Guide to Python Programming

What is up guys? It’s time for Dylan back at it again with another crypto video. In today’s video, we’re continuing on with our intermediate Python series where I show you guys how to program with Python, with the help of everyone’s favorite chatGPT. So in today’s lesson, we’re continuing on with the fourth part where we’re going to talk all about exceptions. If you guys don’t remember where we left off with our program, we just implemented a pretty cool feature where we’re able to send Ada from one wallet to another wallet by validating a random word in the seed phrase list. We’re starting to put everything together and piece together everything that we’ve learned so far with the introductory Python lesson and now with the intermediate Python lesson. In today’s video, we’re just going to take it one step further, implementing some of the stuff that we learned in today’s video. But just in case you guys want to see where we’re at, here is the program:

# Program

<p>
  <div class="js-reframe" style="position: relative; width: 100%; padding-top: 50%;">
    <iframe src="https://www.youtube.com/embed/JJLNn7BxH4M" loading="lazy" frameborder="0" allowfullscreen="" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px;"></iframe>
  </div>
</p>


def take_username():
    username = input('Please enter your username: ')
    return username


def take_wallet():
    wallet = input('Please enter the name of the wallet: ')
    return wallet


def main():
    username = take_username()
    wallet = take_wallet()
    print(f'Username: {username}')
    print(f'Wallet: {wallet}')


if __name__ == '__main__':
    main()

As you can see, we’ve already implemented most of the code for the exceptions part. We just need to add try and catch blocks for all input. Instead of doing it manually, we can use the code generated by chatGPT to implement this automatically. We can copy the code and paste it into our program. After doing that, we can run the program to make sure everything is working correctly. If you guys made it this far, you guys are awesome! Make sure you smash that like button, drop a comment down below, and of course, subscribe to the channel. Thank you guys so much for watching, and have a beautiful day or night wherever you guys are. Dylan out!

Crafting a Killer YouTube Script
Older post

Crafting a Killer YouTube Script

Newer post

The Rise of AI Chatbots: A Comparison of ChatGPT and Googlebot

The Rise of AI Chatbots: A Comparison of ChatGPT and Googlebot