Keen Learner and Exp...ย โขย 4d
Day 10 of learning python as a beginner. Topic: File I/O You guys remeber I once created a to-do list (most probably on day 7)? many amazing people suggested that I should also put a history of tasks. At that time I was not aware about the File I/O in python and today I decided to learn just it. Although I have not finished creating history and then recalling it but I would like to share a quick peek of what I am doing. I guess there may be more ways of creating a history (do tell me if there are) however for now I think the using File I/O may be the current best option. File I/O stands for File input/output and it helps the program to read and write in files it also helps the program remember the user inputs even after the program stops running i.e. by storing the data in a file. As we know programs run on RAM and it is a short term memory by creating file it sends this data to hard disc which is a long term memory (I hope I am correct here do tell me if I have written something wrong). I have used a function for creating history (start from line 24) first I gave a command to open a file (in my case the file has not been created by me it was created by python itself) and then write in it. I have used \n so that every task is created in a new line, as python only adds strings in files (But I have a list) and therefore I used .join() after \n this takes all the items in the list (i.e. our tasks) and creates a string \n breaks this string so that each task is written in a new line. (I hope I was able to explain this clearly). Here's a portion of my code and its result to give you a sneak peek. I acknowledge that this is not yet complete because I also need to make it print when asked (I think I will use the .read() function here). Any suggestions to improve my code are warmly welcomed.
๐ฅ-๐ต-๐-โฝ "Finding ...ย โขย 1y
1. Python: - History: Python was created by Guido van Rossum and was first released in 1991. Its design philosophy emphasizes code readability and its syntax allows programmers to express concepts in fewer lines of code. - Unique Fact: The name
See Moreย โขย
Set2Scoreย โขย 1m
My first chatbot !! I am creating a chatbot for my startup using various tools like Python, its libraries, and OpenAI API keys. Iโll share it once itโs done! I also took a course on Udemy to gain more insights into the process. If youโve ever cre
See MoreKeen Learner and Exp...ย โขย 3d
Day 11 of learning python as a beginner. Topic: creating journal entry program using file I/O. I got a little sidleline from my original plan of editing my to-do list program and created an entirely new program this time for writing a daily journal
See MoreHey I am on Medialย โขย 1y
How I Complete My 5-Day Boring Task in Less Than Half an Hour๐๐ป 1. Eureka Moment: So, I was stuck making PowerPoint slides manually, which was a real pain. Then, I had this genius idea to make things easier by automating the whole process. 2. Hun
See MoreDownload the medial app to read full posts, comements and news.