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

Class notes top 10 programs

Rating
-
Sold
-
Pages
8
Uploaded on
07-03-2023
Written in
2022/2023

in this you get top 10 programs that useful for every placements

Institution
Course

Content preview

Python

placements

programs
Palindrome Program In Python
A palindrome is a number, string or a sequence which will be the same even after we
reverse the order. For example: MADAM, if spelled backwards will be same as MADAM.




Following is the python program to check whether the input string is a palindrome or
not.
1 def pal(num):

, 2 x1 = num[::-1]
3 if x1 == x:
4 print('palindrome')
5 else:
print('not a palindrome')
6
7
print(pal('edureka'))
8
Factorial Program In Python
Factorial of a number is the product of all the positive numbers less than or equal to the
number. The factorial of a number n is denoted by n!.




Following is the program to find the factorial of a number.

1 def fact(num):
2 if num == 0:
3 return num
4 else:
return num * fact(num - 1)
5
print(fact(5))
6
Fibonacci Series
A series in which the next term is the sum of the preceding two terms is called a
fibonacci series. Fibonacci series is asked frequently in interviews.




Following is a program to print a fibonacci series.

1 a = int(input('enter the first element'))
b = int(input('enter the second element'))
2 n = int(input('enter the number of elements '))
3 print(a,b, end=" ")
4
5 while n-2:

Written for

Course

Document information

Uploaded on
March 7, 2023
Number of pages
8
Written in
2022/2023
Type
Class notes
Professor(s)
Vamsi
Contains
All classes

Subjects

$5.29
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
vamsichirumamilla

Get to know the seller

Seller avatar
vamsichirumamilla python
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 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