#learn python with f.m.
Explore tagged Tumblr posts
Text
Python Day 2
Today I am starting off with exercise 13. Exercise 13 introduces the concepts of variables, modules, and argv.
[ID: Exercise 13 code. It imports the argv module from sys, then uses argv to create 4 variables, script, first, second, and third. Next print() is used to print out the different variables /ID]
When calling the program I was confused as to why I got the error of too many variables. Looking into this I found that the first variable of 'argv' is always going to be the script. I then fixed that and added in script as the first variable.
Next for the study drill I wrote a new variable and updated the code to print the retrieved information.
Alrighty then - onto exercise 14. Exercise 14 is about practicing prompts and variables.
In the study drills I updated the script with a new prompt and print statement.
Exercise 15 is a simple program that prints out the contents of a file. An important thing to note is to always close the file when doing things like this!
Exercise 16 practices making a copy of a file and then updating it with 3 lines from user input.
I ended up running into the issue where it was saying that it couldn't read the file. I ended up finding out that .read() starts from the cursor position - and if the cursor is at the end of the file from writing it you will not have your file printed.
Exercise 17 is practicing copying files over and was relatively simple.
#learn python with F.M.#learn to code#learn python#coding resources#python#coding#lpthw#transgender programmer#codeblr#code#image undescribed#Sorry for not adding ID folks - my spoons are too low
4 notes
·
View notes
Text
Day 6-7
Date -06/06/2024
My Python Learning
I learn how to make Dictionaries, if else, while loop in python.
1. Add item, remove item, copy in Dictionaries
2. Dictionaries Methods
3. If Else
4. While loop
You can Learn with me.
#100 day challenge#coding#codeblr#learning#my python learning#programming#python#study aesthetic#studyblr#college#studyspo#student#learn python with f.m.#spotify#today i learned#study motivation#Spotify
3 notes
·
View notes
Text
Day 2-3
26|05|2024
My Python Learning
I learn how to make list and matrix in python. (list part 2)
1.list comprehension
2.sort list
3.copy list
4.matrix
5.Tuples
(I am little sad cz my favourite players Toni Kroos is played his last game in Santiago Bernabeu. 🥺)
#study motivation#studyblr#learn python with f.m.#programming#coding#python#codeblr#dark academia#study aesthetic#100 day challenge#learning#my python learning#Spotify
4 notes
·
View notes
Text
Python Day 5
Today we warm up by completing Exercise 25. This is even more practice with functions and variables!
To run the program we call python in the terminal and import ex25 from there.
As I was working through calling the different functions in the terminal I realized that I missed a function - specifically the one that sorted a sentence. I called it and ended up getting a mess of individual letters. After bug hunting I found the issue to be that I called sort_words(sentence) instead of sort_words(words)
After fixing those issues I finished running through the function calls in the terminal and it went great!
Up next is Exercise 26! We are halfway through the book and it is time for a test. We are given broken code that we copy paste into a file. Our job is to fix it and get the program running! As I went through the program I left comments wherever I was fixing code. Below is my finished and fixed program.
And here is the output in the terminal:
Exercise 27 went over different booleans as well as a chart to memorize. The next practical was exercise 28 where you type in different statements then guess if they will be true or false. With my previous experience in programming I already knew a lot - the only thing that tripped me up was NOT OR booleans. Here's the output of the terminal!
Chugging right along to Exercise 29! ex29 introduced if statements. I already know lots about if statements from Javascript so this is more of a refresher than anything.
And then the output:
Exercise 30 introduces Else If statements.
And the output:
Exercise 31 combines everything that we've learned about If/Elif statements with the new concept of Nested statements. Using nested statements we are able to write a very simple Choose Your Own Adventure text game.
Here are a couple different runs I did with this program. My first try was not the best - I ended up having my mind turned into Jello!
My second run went better! I ran into a bear but I survived.
For the study drill it challenged me to write my own text game. I made a very simple one and got about halfway through where I want it to be.
That's it for today folks!
#learn python with f.m.#learn to code#lpthw#python#learn python#codeblr#coding#code#programming#transgender programmer#image undescribed
6 notes
·
View notes
Text
Python Day 6
Today we are starting out with exercise 32. We are getting introduced to lists as well as for loops.
And the output:
Up next is ex33.py! This is introducing While loops.
And then the output:
1 note
·
View note
Text
Python Day 4
We are starting out strong! Exercise 24 is a review of everything we've learned so far.
And the output:
Today was a pretty slow day and I only got one exercise done - but it’s better than nothing!
#learn python with f.m.#learn to code#learn Python#coding resources#Python#coding#codeblr#lpthw#transgender programmer#code#image undescribed
1 note
·
View note
Text
Python Day 3
Today I am starting out with Exercise 18. It introduces the concepts of functions!
Next is Exercise 19. It talks about how to use functions and variables together.
And now for the output when I run it:
In the study drill it challenged me to write my own function. I decided to write a function to check if you had enough crackers and cheese for a 1:1 ratio.
And the output:
Exercise 20 is about using functions along with files.
#learn python with f.m.#learn to code#learn Python#coding resources#Python#coding#lpthw#transgender programmer#codeblr#code#image undescribed#No ID today folks sorry
0 notes
Text
Python Day 1
I have prior experience in Python but it's been a couple years since I last used it and I've forgotten most of it. I'm working through the book 'Learn Python the Hard Way' v3 by Zed Shaw. If you are interested in getting a copy feel free to shoot me a message and I can help you out! This is the start of my post series on learning Python - if you have any suggestions, comments, or questions I would love to hear more! Also for this post I have used brief Image Descriptions and did not include the full program in the ID. If you want me to include the actual code in the ID please let me know and I will do that in the future under a line break so my posts don't eat up people's feeds.
[ID 1: Exercise 10 program in VSCode. It uses variables and Print() to print out different sentences to demonstrate different escape sequences /ID]
[ID 2: Output of Exercise 10. It is a list with cat food, fishies, catnip, and grass. /ID]
Exercise 10 is about learning different escape sequences. For example if you are defining your variable text string with "double quotes" and want to use double quotes within the text string you need to use an escape sequence so it doesn't think you are ending your variable early.
Another important thing with Escape Sequences is to make sure that you are using the \ backslash instead of / forward slash.
An important thing with the book is he gives you Study Drills on how to experiment and learn more on your own. I really like this book due to that, in addition to how copying the programs helps train your eye to pick up small errors. Let me tell you - the amount of time that I have spent confused as to why my program was broken and it turned out to be a missing character is a lot.
[ID 3: Exercise 11 in VSCode using Print() and Input() to get someone's age, height, and weight /ID]
[ID 4: Exercise 11 output saying I'm 23, 5'5, and 198 heavy /ID]
The Study Drill asks me to research Input() and to write another form to ask more questions. Researching Input I found that you not need to use Print statements - you can print the user input prompt directly inside the parenthesis of Input. I decided to write a form that would get your short, mid, and long term goals without using Print() statements to get user input.
[ID 5: A python program that uses Input() to get short, mid, and long term goals before printing them all together /ID]
[ID 6: The output of the above program. My long term career goal is to work in Cybersecurity, my mid term career goal is to go to college and get a degree in Computer Science, and my short term career goal is to get as many certificates as I can in my trade school /ID]
Exercise 12 introduces the concept that you can skip using Print statements and has you re-write Exercise 11 without using Print statements.
Anyway that's all that I worked on today! Hopefully you learned something.
#learn python with F.M.#learn to code#learn python#coding resources#python#coding#lpthw#transgender programmer#codeblr#code#image described
1 note
·
View note
Text
About Me
Name: F.M. (Yes, like the radio)
Age: 20’s
Favorite Color: Orange
Favorite Coding Language: Python
Planned Major: Computer Science (Cybersecurity)
I’m also multiply disabled! I have HSD (probable EDS), IBD, a bunch of other stuff I’m not going to list and have hearing loss. I am a cane, rollator, and wheelchair user.
I’m passionate about Disability Activism, Social Justice, Accessibility, Urban Infrastructure Design, Environmentalism, Fanfiction, and Programming. I am currently in a trade program but hope to go to college after this.
I plan on using this blog to talk about Disability stuff and Programming. I’ll be starting out talking about my networking curriculum and Python.
Tags:
#cripplepunk is for disability talk
#disability is for general disability things like art or non cpunk related talk
#F.M. Learns Python is my Python series tag
#codeblr or #coding is for general programming content
#crippl-hacker asks is for any asks I receive
#fm talks is for personal posts
#image described I tag images consistently about 90% of the time. I try to add image descriptions but if not I use the #image undescribed tag. Any image descriptions in alt text will be tagged with #image description in alt
#rb is for reblogs
#introduction#intro post#about me#programming#codeblr#cripplepunk#disability#actually disabled#cripplepunk blog
17 notes
·
View notes