Learning Python Part 3

in STEMGeeks10 months ago

Hi fellow Hiveians,

Today I am closing in on the final lessons of python before I finish the material!


Hive Divider Bar Text.png

Tail Eating

There are points where I haven’t been sure about the things I am learning, particularly as the lessons get more complicated but it’s getting better. I’m able to put the info from the lessons into my thoughts and get the questions correct which has been nice to see.

This functionality, init seems to be pretty useful so I need to explore how it can be used more but from what I understand thus far, it can be used to define things with multiple variables and pull a desired one out. I have been thinking of all of this in the context of the game I plan on developing so that’s been a nice lens to think through.


Even though the info is pretty basic, I do best with repetition and doing it myself instead of just reading it. I have been copying the model code and making my own spin on it.


The “r” section of the python code seems to be pretty important from what I can see. It’s got a lot of potential uses that I will be able to hopefully flesh out further in the coming days and weeks. This ability to decipher an email address from a bar of text was interesting to see how the background code is handled.


The hardest part for me is when I have to create my own code entirely. These code challenges are really good in that they make you think and do some actual coding but they are sometimes really hard! Being difficult isn’t all that bad, especially because there are quite a few people willing to help so that’s been good. I’ve been stuck on this Fibonacci code sample for a long time and haven’t been able to focus on trying to get it solved.


The first part of my code here was the better of the two. It’s my chronological second but you get the point. I was able to get closer to solving it by getting some help from others who were struggling to solve it but haven’t been able to quite figure it out yet.


If you’re a python ace and have a tip of how I could improve my code, let me know! :D


Hive Divider Bar Centered.png

Connect with me!

Do you want to get paid, in crypto, for searching the internet? Try using and signing up for Presearch to earn some great crypto! I've currently got 2,011 PRE tokens, with a market value of $36.57. It doesn't sound like a lot but when you search using sites like Google you get paid $0! Join Presearch to break Google's stranglehold on the internet searches. If you'd like to sign up, use my referral link!

Posted with STEMGeeks


Hello @cmplxty great tutorial . I would however like a source code at the end if possible ? That would be super helpful :)

Thanks! The code I am using for this is:

num = int(input())

def fibonacci(num):
#complete the recursive function
if num <= 1:
return 1
return ((num-1) + (num-2))



Cheers, @amr008 You Successfully Shared 0.100 WINE With @cmplxty.
You Earned 0.100 WINE As Curation Reward.
You Utilized 1/3 Successful Calls.


WINE Current Market Price : 0.000 HIVE

lol thanks, could use some wine right about now!

I ended up solving the problem thankfully. I don't remember specifically what it was I had to do but it's done now!

Congratulations @cmplxty! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You made more than 8000 comments. Your next target is to reach 8500 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @hivebuzz:

Guess the producer of the "50 Million Block" and win HIVES
First Hive Power Up Day of 2021 - Get a Hive Power delegation