Skip to main content

Practice python

 1.) n=int(input("Enter a number n: "))

temp=str(n)

t1=temp+temp

t2=temp+temp+temp

comp=n+int(t1)+int(t2)

print("The value is:",comp)

2.) lower=int(input("Enter lower range limit:"))

upper=int(input("Enter upper range limit:"))

n=int(input("Enter the number to be divided by:"))

for i in range(lower,upper+1):

    if(i%n==0):

        print(i)

3.) a=int(input("Enter first number:"))

b=int(input("Enter second number:"))

c=int(input("Enter third number:"))

d=[]

d.append(a)

d.append(b)

d.append(c)

for i in range(0,3):

    for j in range(0,3):

        for k in range(0,3):

            if(i!=j&j!=k&k!=i):

                print(d[i],d[j],d[k])


Comments

Popular posts from this blog

Important links

  Software Drive https://drive.google.com/drive/folders/1siws7oga-10wdlPhOdcjamlDH6wm0iE_?usp=sharing PPT Drive https://drive.google.com/drive/folders/1lNHhZ4_qlsyHrWA862DyBSvkF_J4YVp8 https://docs.google.com/document/d/1fo_4gFB4sgWfTBfZvK7qf0LP0y9ge1dH/edit

Python Practice questions

Reverse  Check substring in string  Armstrong no or not Palindrome  Table print  Power of the no Factorial