Akansha Yadav builds a Python quote generator using the random library. Store quotes in a list, use random.choice() to pick one, and run it twice to see different results each time. Add as many quotes as you want from ChatGPT or anywhere else.
Chapters
Let's create a code generator using Python programming language. So here I am going to use a library called random, creating a variable code, and I am going to store 5 codes in it. You can store as many you want. The innovation and the followers— this is said by Steve Jobs— and the future belongs to those who believes in the beauty of their dreams. So another one is the only limit to the realization of— you can take it from ChatGPT or from Google or wherever, like if you have the codes, then you can use that. After doing so, I'm creating another variable random_code where I'm going to use a method called random.choice and printing it. I'm going to test it over here. I'm going to run the program. So here we got our output, which is innovation distinguishes between the leader and a follower, which is said by Steve Jobs. Now I'm trying to run it again just to check whether it is randomly generating it or not.