Today I Learned About Recursion: What They Are And How To Use Them.

#Recursion = technique where a function invokes itself

#fibonacci sequence with recursion

def fibonacci_sequence(n):
    if n > 1 :
        return None
    if n < 3:
        return 1 #for 1 and 2 the result is 1
    #for others numbers
    return fibonacci_sequence(n-1) + fibonacci_sequence(n - 2) #using the function to calculate the numbers to use

#facorial function with recursion
def factorial_function(n):
    if n < 0:
        return None
    if n == 1:
        return 1 
    
    while n > 1 :
        return n * factorial_function(n - 1)

   
   
print(factorial_function(4))

Today I learned about recursion: what they are and how to use them.

Very cool!

I did two exercises (two functions): one with the fibonacci sequence and the other with the factorial function.

More Posts from Artemisthevirginhunter and Others

800 free Computer Science classes | Comp-Sci Resources ♥

800 Free Computer Science Classes | Comp-Sci Resources ♥

800 free Computer Science classes you could take online right with video lectures!

Link: GitHub - Developer-Y/cs-video-courses: List of Computer Science courses with video lectures

I found this link in a tweet and found the site very helpful! Take full advantage comp sci learners!!!

Have a nice day and happy programming ♥

I’ve Turned Into A Purple Gel Pen Girl Of Late
I’ve Turned Into A Purple Gel Pen Girl Of Late

i’ve turned into a purple gel pen girl of late

11 months ago

this is so mean but sometimes i see published writing and suddenly no longer feel insecure about my own writing ability. like well okay that got published so im guessing i dont have much to worry about

Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.
Overly Honest Methods In Science.

Overly Honest Methods in science.

I’ve Got To Stop Acting Like I’m On Holiday💀
I’ve Got To Stop Acting Like I’m On Holiday💀
I’ve Got To Stop Acting Like I’m On Holiday💀
I’ve Got To Stop Acting Like I’m On Holiday💀

I’ve got to stop acting like I’m on holiday💀

6 months ago

new lestat edit, i love this diva

THE INTERVIEW WITH THE VAMPIRE ; AMC productions.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

The look on lestat's face! Like he is angry that he's doing this when he wants to give louis attitude for being a mean bitch to him hours ago, but then he hears her and is a little, if not a lot, intrigued about her.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

Now that they're playing daddies to little Claudia, they're are absolutely going to discuss the clothes, ah yes, the joy of parents.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

This was probably the funniest part of the episode😂😂, lestat being his usual sarcastic self.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

He really has been away from children for too long😂

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

No comment, teen problems😂

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

This fight! They act so much like a family now, parents fighting over their teenage vampire daughter. Despite the fact that lestat is overly annoyed most of the times about Claudia's antics he doesn't entirely hate the concept.

This scene is almost a depiction of the possible consequences, –although the argument here subsides–, of Claudia's curiousity.

Louis told Claudia to be careful when digging around and troubling lestat with questions because as knew all to well, that past troubles some people.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

This was a beautiful scene. Louis introducing Claudia to the idea that love works the same for all –objective in basics and free for subjective interpretations of the nuances. He answered her questions with just a few words but did so gently, not rebuking her, not confusing her more, just telling what it really is. This scene says so much about Louis and his acceptance of his sexuality throughout his years with lestat.

He's embraces that part of his identity.

THE INTERVIEW WITH THE VAMPIRE ; AMC Productions.

This show!!! I mean the way they've portrayed Anne Rice's vampires on-screen, as eternal beings with having subtle shades of humanity. Of being murderers, almost like apex predators in their own habitat but still having the similar concerns of failure as a parent, of hurting their loved ones. And sometimes, of hunting the wrong prey, which is clearly the humane side of them bothering.

EPISODE 4, S1


Tags
11 months ago

"homosexuality is unnatural! there's only two genders! it's a sin-"

I'm sorry, have you seen NATURE???

ALSO THE ARTIST IS HUMON, FIND THEM AT HUMONCOMICS.COM!! was so sure I had included that but apparently I forgot, so sorry!

"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"
"homosexuality Is Unnatural! There's Only Two Genders! It's A Sin-"

and there's so many more species than this that exhibit homosexuality, varying genders, etc. SO! MANY!

it's very much a natural thing. it always has been. unfortunately, while homosexuality is found in many species, homophobia is only found in one

EDIT: added a keep reading cause this is a long post lol

EDIT: everyone in the comments needs to shut up or I will turn comments off, stop arguing, jeez

  • thechosenone42
    thechosenone42 liked this · 1 year ago
  • flaggersribs
    flaggersribs liked this · 2 years ago
  • abdoulaye510
    abdoulaye510 liked this · 2 years ago
  • links-studies
    links-studies reblogged this · 2 years ago
  • thatchedfloor
    thatchedfloor liked this · 2 years ago
  • fabiodisconzi
    fabiodisconzi liked this · 2 years ago
  • elu-xx
    elu-xx reblogged this · 2 years ago
  • pumpkinylink
    pumpkinylink liked this · 2 years ago
  • shakshukagirl
    shakshukagirl liked this · 2 years ago
  • homo-lorens
    homo-lorens reblogged this · 2 years ago
  • variablecemetery
    variablecemetery liked this · 2 years ago
  • little-tornad0
    little-tornad0 reblogged this · 2 years ago
  • little-tornad0
    little-tornad0 liked this · 2 years ago
  • crackaddict55
    crackaddict55 liked this · 2 years ago
  • artemisthevirginhunter
    artemisthevirginhunter reblogged this · 2 years ago
  • artemisthevirginhunter
    artemisthevirginhunter liked this · 2 years ago
  • endvertex
    endvertex liked this · 2 years ago
  • zoeythebee
    zoeythebee liked this · 2 years ago
  • xiabablog
    xiabablog reblogged this · 2 years ago
  • xiabablog
    xiabablog liked this · 2 years ago
  • redheaded-techpriest
    redheaded-techpriest reblogged this · 2 years ago
  • python-programming-language
    python-programming-language liked this · 2 years ago
  • wallf1ower
    wallf1ower liked this · 2 years ago
  • redheaded-techpriest
    redheaded-techpriest liked this · 2 years ago
  • elu-xx
    elu-xx reblogged this · 2 years ago

ANOTHER STUDYBLR

183 posts

Explore Tumblr Blog
Search Through Tumblr Tags