Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Python Full Course Step by Step Guide

Rating
-
Sold
-
Pages
15
Uploaded on
21-10-2023
Written in
2023/2024

Python courses can vary widely in terms of duration, depth, and specific focus. They may be offered in various formats, such as online courses, in-person classes, or self-paced learning platforms. Your choice of course should depend on your goals and prior programming experience. Python is a valuable skill in fields like web development, data science, scientific computing, and more, so learning Python can open up numerous career opportunities.

Show more Read less
Institution
Course

Content preview

Recursion in Python | Python Tutorial - Day
#30


We all saw functions and it was fun knowing about it. Today, let
me tell you about 'recursions'. Recursions are basically
functions but when inside a function you call the exact same
function, it's called recursion. This topic blows everyone's
mind, but how easy this topic is, you'll appreciate it after
reading further.

So, let's hop onto the computer screen and see how recursions
are written in Python.

The formula is correct, definitely, and absolutely correct. You
can even use this information to recursively calculate factors.
The answer is 'yes'. For example, you can write 6! as 6 × 5!.

So, what we did here is call a function inside the same function
but with a different argument n1. Now, let me teach you how
this function works.

Recursion is the process of defining something in terms of
itself, just as we did with the factorial. n = n multiplied by the
factorial of n1.

One more popular example is the calculation of the Fibonacci
series. The formula is i. Do make your own program and share
it in the comment section below.

If you need a program to calculate f6, it should output 8. The
program should follow this pattern: 1+0=1, 1+1=2, 1+3=8,
and so on.

, Sets in Python | Python Tutorial - Day #31
Everything in Python is an object. If you want a data entry in
Python with no repeated entries, you can make a set. If you
want the list that you're making to have no repetitions, we can
make 'sets' for this. Let's see the methods of sets and why it's
used. Python doesn't guarantee maintained order. Sets are
unchangeable, meaning you can't change items of a set once
they are created, and sets don't contain duplicate items. Set
items are separated by commas and enclosed within curly
brackets.

Now, let's take a quick quiz. Try to create an empty set and
check using the type function. The syntax for a set and
dictionary both start and end with a curly bracket. After this, I'll
print 'type of harry'; you must get a set. If you wrote this code,
it's absolutely wrong. This is because Python doesn't give us
maintained order in a set. That is something you should know.
In the next video, I'll tell you how to access set items.

Written for

Course

Document information

Uploaded on
October 21, 2023
Number of pages
15
Written in
2023/2024
Type
Class notes
Professor(s)
Mr carvin
Contains
All classes

Subjects

$50.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
anilkumarsharma

Get to know the seller

Seller avatar
anilkumarsharma Self
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions