Facebook
From shubh, 1 Year ago, written in Python.
This paste is a reply to Re: Re: first from shubhamguptaaa - go back
Embed
Viewing differences between Re: Re: first and Re: Re: Re: first
FIBONACCI SERIES
n=int(input("enter the numger"))
n1,n2=0,1
count=0
if n<=0:
    print("please enter the positive number")
elif n==1:
    print(n1)
else:
    print("the fibonacci seroes is")
    while count         print(n1)
        nth=n1+n2
        n1=n2
        n2=nth
        count += 1
1

PRACTICAL 3A
import string
alphabet=set(string.ascii_lowercase)
def ispangram(str):
    return not set (alphabet)-set (str)
string='the quick brown fox jumps over the lazy dog'
if (ispangram (string) ==True):
    print("It is a pangram")
else:
    print("It is not pangram")
  
ARMSTRONG AND PALINGDROM
def armstrong(n):
    return n
n=int(input("Enter number"))
Sum=0
temp=n
while temp>0:
    digit=temp
    Sum+ digit**3
    temp//=10
if n==sum:
    print(n, "Is armstrong")
else:
    print(n," Is not armstrong")
def palindrome(num):
    return num
num=int(input("Enter number"))
temp=num
rev=0
while num>0:
    dig=num
    rev=rev*10+dig
    num//=10
if temp==rev:
    print("Is palindrome")
else:
    print("Is not palindrome")

    
    

Replies to Re: Re: Re: first rss

Title Name Language When
############### snonyamout####### python 1 Year ago.