Thursday, 19 September 2024

Practical - 69 - Write a program in python to input a number and calculate factorial of a number.

Practical - 69 - Write a program in python to input a number and calculate factorial of a number.


Ans:

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

fact=1

if(n<0):

    print("Factorial can not be find of a negative number")

elif(n==0):

    print("Factorial of 0 is 1")

else:

    for i in range(1,n+1):

        fact=fact*i

    print("Factorial of",n,"is",fact)

 

Output:

Enter a number: -2

Factorial can not be find of a negative number


OR


Enter a number: 0

Factorial of 0 is 1


OR


Enter a number: 6

Factorial of 6 is 720

Practical - 68 - Write a program in python to print the tables all all numbers from 2 to 10

Practical - 68 - Write a program in python to print the tables all all numbers from 2 to 10


Ans:

print("Table form 2 to 10: ")

for n in range(2,11):

    for i in range(n,n*10+1,n):

        print(i,end=" ")

    print()

 

Output:

Table form 2 to 10: 

2 4 6 8 10 12 14 16 18 20 

3 6 9 12 15 18 21 24 27 30 

4 8 12 16 20 24 28 32 36 40 

5 10 15 20 25 30 35 40 45 50 

6 12 18 24 30 36 42 48 54 60 

7 14 21 28 35 42 49 56 63 70 

8 16 24 32 40 48 56 64 72 80 

9 18 27 36 45 54 63 72 81 90 

10 20 30 40 50 60 70 80 90 100


Practical - 67 - Write a program in Python to input a number and print the table of that number.

 Practical - 67 - Write a program in Python to input a number and print the table of that number.


Ans:

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

for i in range(1,11):

    print(n,"*",i,"=",n*i)

 

Output:

Enter a number: 5

5 * 1 = 5

5 * 2 = 10

5 * 3 = 15

5 * 4 = 20

5 * 5 = 25

5 * 6 = 30

5 * 7 = 35

5 * 8 = 40

5 * 9 = 45

5 * 10 = 50


Practical - 66 - Write a program in python to input number of seconds and print it in the form: hrs:mins:sec. e.g. 4815 seconds are printed as 1 hrs:20 mins:15 secs

Practical - 66 - Write a program in python to input number of seconds and print it in the form: hrs:mins:sec. e.g. 4815 seconds are printed as 1 hrs:20 mins:15 secs


Ans:

n=int(input("Enter number of seconds = "))

hrs=n//3600

n=n-hrs*3600

mins=n//60

sec=n-mins*60

print(hrs,"hrs:",mins,"mins:",sec,"sec")

 

Output:

Enter number of seconds = 4815

1 hrs: 20 mins: 15 sec


Practical - 65 - Write a Python program to take sides of a triangle as input and print its area using Heron's Formula.

Practical - 65 - Write a Python program to take sides of a triangle as input and print its area using Heron's Formula.


Ans:

a=int(input("Enter First side of triange: "))

b=int(input("Enter Second side of triange: "))

c=int(input("Enter Third side of triange: "))

s=(a+b+c)/2

area=(s*(s-a)*(s-b)*(s-c))**0.5

print("Area of triangle=",area)

 

Output:

Enter First side of triange: 3

Enter Second side of triange: 4

Enter Third side of triange: 5

Area of triangle= 6.0


Monday, 16 September 2024

เคถिเค•्เคทเค• เคฌเคจเคจे เค•ी เค“เคฐ เคฎेเคฐा เคชเคนเคฒा เค•เคฆเคฎ

 เคถिเค•्เคทเค• เคฌเคจเคจे เค•ी เค“เคฐ เคฎेเคฐा เคชเคนเคฒा เค•เคฆเคฎ

เคฎेเคฐा เคจाเคฎ เคธเคšिเคจ เคถเคฐ्เคฎा เคนै। เคฎेเคฐा เคœเคจ्เคฎ เค‰เคค्เคคเคฐ เคช्เคฐเคฆेเคถ เค•े เคฎुเคœเคซ्เคซเคฐเคจเค—เคฐ เคœिเคฒे เค•े เคเค• เค›ोเคŸे เคธे เค—ाँเคต, เคญाเคฏंเค—ी เคฎें เคเค• เค—เคฐीเคฌ เคฌ्เคฐाเคน्เคฎเคฃ เคชเคฐिเคตाเคฐ เคฎें เคนुเค†। เคนเคฎाเคฐा เคชเคฐिเคตाเคฐ เค–ेเคคी เคชเคฐ เคจिเคฐ्เคญเคฐ เคฅा। เคฎेเคฐे เคชिเคคाเคœी, เคšाเคšाเคœी เค”เคฐ เคฆाเคฆाเคœी เคธเคญी เค–ेเคคी เค•เคฐเคคे เคฅे। เคœीเคตเคจ เค•เค िเคจाเค‡เคฏों เคธे เคญเคฐा เคฅा, เคฒेเค•िเคจ เคนเคฎाเคฐे เคชเคฐिเคตाเคฐ เคฎें เคˆเคฎाเคจเคฆाเคฐी เค”เคฐ เคฎेเคนเคจเคค เค•ी เค—เคนเคฐी เคจींเคต เคฅी, เคœिเคธเคจे เคฎुเคे เคœीเคตเคจ เค•े เคนเคฐ เค•เคฆเคฎ เคชเคฐ เคช्เคฐेเคฐिเคค เค•िเคฏा।

เคฎेเคฐी เคช्เคฐाเคฐंเคญिเค• เคถिเค•्เคทा เค—ाँเคต เค•े เคธเคฐเค•ाเคฐी เคช्เคฐाเคฅเคฎिเค• เคตिเคฆ्เคฏाเคฒเคฏ เคฎें เคนुเคˆ เคฅी। เค‰เคธ เคธเคฎเคฏ เคธ्เค•ूเคฒ เคฎें เค•ेเคตเคฒ เคเค• เคนी เคถिเค•्เคทเค• เคฅे, เคถ्เคฐी เคจाเคนเคฐ เคธिंเคน เคœी। เคตे เคจ เค•ेเคตเคฒ เคฎेเคฐे เคถिเค•्เคทเค• เคฅे, เคฌเคฒ्เค•ि เคฎेเคฐे เคชเคนเคฒे เค—ुเคฐु เคญी เคฅे, เคœिเคจ्เคนोंเคจे เคฎेเคฐे เคœीเคตเคจ เค•ो เค†เค•ाเคฐ เคฆेเคจे เคฎें เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคญूเคฎिเค•ा เคจिเคญाเคˆ। เค‰เคจเค•ी เคถिเค•्เคทा เค”เคฐ เค…เคจुเคถाเคธเคจ เคจे เคฎुเค เคชเคฐ เค—เคนเคฐा เคช्เคฐเคญाเคต เค›ोเคก़ा। เค‰เคจ्เคนोंเคจे เคนเคฎें เคจ เคธिเคฐ्เคซ เค•िเคคाเคฌों เค•ा เคœ्เคžाเคจ เคฆिเคฏा, เคฌเคฒ्เค•ि เคœीเคตเคจ เค•े เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคฎूเคฒ्เคฏ เคญी เคธिเค–ाเค, เคœिเคจเค•ा เค…เคจुเคธเคฐเคฃ เคฎैं เค†เคœ เคญी เค•เคฐเคคा เคนूँ। เคฎैं เค†เคœ เคœो เค•ुเค› เคญी เคนूँ, เค‰เคธเคฎें เค‰เคจเค•ा เคฏोเค—เคฆाเคจ เค…เคตिเคธ्เคฎเคฐเคฃीเคฏ เคนै।

เคœเคฌ เคฎैं เคคीเคธเคฐी เค•เค•्เคทा เคฎें เคฅा, เคคเคฌ เคถ्เคฐी เคจाเคนเคฐ เคธिंเคน เคœी เคจे เคฎेเคฐे เคญीเคคเคฐ เค•ी เค•्เคทเคฎเคคा เค•ो เคชเคนเคšाเคจा। เคšूंเค•ि เคตे เคธ्เค•ूเคฒ เคฎें เค…เค•ेเคฒे เคถिเค•्เคทเค• เคฅे เค”เคฐ เค•เค•्เคทा 1 เคธे 5 เคคเค• เคธเคญी เค•เค•्เคทाเคँ เค‰เคจ्เคนीं เค•ो เคชเคข़ाเคจी เคนोเคคी เคฅीं, เค‡เคธเคฒिเค เค…เค•्เคธเคฐ เคตे เค›ोเคŸी เค•เค•्เคทाเค“ं เค•ो เคชเคข़ाเคจे เค•ी เคœ़िเคฎ्เคฎेเคฆाเคฐी เคฎुเคे เคธौंเคช เคฆेเคคे เคฅे। เค‰เคธ เคธเคฎเคฏ เคฎैं เค•เค•्เคทा 3 เคฎें เคฅा, เค”เคฐ เคฏเคน เคฎेเคฐे เคœीเคตเคจ เค•ा เคเค• เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคฎोเคก़ เคธाเคฌिเคค เคนुเค†। เค‰เคจเค•े เคฎाเคฐ्เค—เคฆเคฐ्เคถเคจ เคฎें เคฎैंเคจे เคชเคข़ाเคจे เค•ी เค•เคฒा เคธीเค–ी। เคฏเคน เค…เคจुเคญเคต เคฎेเคฐे เคฒिเค เคตिเคถेเคท เคฅा, เค•्เคฏोंเค•ि เคฏเคนीं เคธे เคฎेเคฐे เค…ंเคฆเคฐ เคชเคข़ाเคจे เค•ी เคฐुเคšि เค”เคฐ เคœिเคฎ्เคฎेเคฆाเคฐी เค•ा เคฌीเคœ เคฌोเคฏा เค—เคฏा।

เค†เคœ เคฎैं เคเค• เคช्เคฐเคคिเคท्เค िเคค เคถिเค•्เคทเค• เคนूँ, เค”เคฐ เค‡เคธ เคฏाเคค्เคฐा เค•ी เคถुเคฐुเค†เคค เคฎेเคฐे เค—ाँเคต เค•े เค‰เคธी เค›ोเคŸे เคธे เคธ्เค•ूเคฒ เคฎें เคนुเคˆ เคฅी, เคœเคนाँ เคฎेเคฐे เค—ुเคฐु เคถ्เคฐी เคจाเคนเคฐ เคธिंเคน เคœी เคจे เคฎुเคे เคจ เค•ेเคตเคฒ เคถिเค•्เคทा เค•ा เคฎเคนเคค्เคต เคธिเค–ाเคฏा, เคฌเคฒ्เค•ि เคฎुเคे เคเค• เคถिเค•्เคทเค• เคฌเคจเคจे เค•ी เคฆिเคถा เคฎें เคญी เคช्เคฐेเคฐिเคค เค•िเคฏा। เค‰เคจเค•े เคธिเค–ाเค เค—เค เคชाเค  เค”เคฐ เค‰เคจเค•ा เคตिเคถ्เคตाเคธ เคฎेเคฐे เคœीเคตเคจ เค•ा เค†เคงाเคฐ เคฌเคจ เค—เค।

Sunday, 15 September 2024

เค…เคญिเคฏंเคคा เคฆिเคตเคธ (Engineer’s Day)

เค…เคญिเคฏंเคคा เคฆिเคตเคธ (Engineer’s Day)

เค…เคญिเคฏंเคคा เคฆिเคตเคธ เคนเคฐ เคธाเคฒ 15 เคธिเคคंเคฌเคฐ เค•ो เคฎเคจाเคฏा เคœाเคคा เคนै, เคœो เคฎเคนाเคจ เคญाเคฐเคคीเคฏ เค…เคญिเคฏंเคคा, เคธเคฐ เคฎोเค•्เคทเค—ुंเคกเคฎ เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เค•ी เคœเคฏंเคคी เค•े เค‰เคชเคฒเค•्เคท्เคฏ เคฎें เคฎเคจाเคฏा เคœाเคคा เคนै। เคธเคฐ เคเคฎ. เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เค•ो เค‰เคจเค•े เค…เคธाเคงाเคฐเคฃ เคฏोเค—เคฆाเคจ เค”เคฐ เคญाเคฐเคค เคฎें เค…เคญिเคฏंเคคा เค•े เค•्เคทेเคค्เคฐ เคฎें เค‰เคจเค•े เคฏोเค—เคฆाเคจ เค•े เคฒिเค เคฏाเคฆ เค•िเคฏा เคœाเคคा เคนै। เค‰เคจเค•ा เคœเคจ्เคฎ 15 เคธिเคคंเคฌเคฐ, 1861 เค•ो เคนुเค† เคฅा เค”เคฐ เค‰เคจ्เคนोंเคจे เค‡ंเคœीเคจिเคฏเคฐिंเค— เค•े เค•्เคทेเคค्เคฐ เคฎें เค…เคฆ्เคตिเคคीเคฏ เค‰เคชเคฒเคฌ्เคงिเคฏाँ เคนाเคธिเคฒ เค•ीं, เคœिเคธเค•े เค•ाเคฐเคฃ เค‰เคจ्เคนें 1955 เคฎें 'เคญाเคฐเคค เคฐเคค्เคจ' เคธे เคธเคฎ्เคฎाเคจिเคค เค•िเคฏा เค—เคฏा।

เค…เคญिเคฏंเคคा เค•ा เคฎเคนเคค्เคต

เค…เคญिเคฏंเคคा เคนเคฎाเคฐे เคธเคฎाเคœ เค•े เคจिเคฐ्เคฎाเคคा เคนोเคคे เคนैं। เค‰เคจเค•ी เค•เคก़ी เคฎेเคนเคจเคค เค”เคฐ เคคเค•เคจीเค•ी เค•ौเคถเคฒ เค•े เคฌिเคจा เคนเคฎ เค†เคงुเคจिเค• เคœीเคตเคจ เค•ी เคธुเคตिเคงाเค“ं เค•ा เค†เคจंเคฆ เคจเคนीं เคฒे เคธเค•เคคे। เคšाเคนे เคตเคน เคธเคก़เค•ें เคนों, เคชुเคฒ, เค‡เคฎाเคฐเคคें, เคฏा เคฌिเคœเคฒी เคธंเคฏंเคค्เคฐ, เคนเคฐ เคœเค—เคน เค…เคญिเคฏंเคคा เค•ा เคฏोเค—เคฆाเคจ เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคนै। เคตเคน เคจ เค•ेเคตเคฒ เคจिเคฐ्เคฎाเคฃ เค•ाเคฐ्เคฏ เคฎें, เคฌเคฒ्เค•ि เคคเค•เคจीเค•ी เคตिเค•ाเคธ, เคธॉเคซ्เคŸเคตेเคฏเคฐ เค‡ंเคœीเคจिเคฏเคฐिंเค—, เค”เคฐ เคตैเคœ्เคžाเคจिเค• เค…เคจुเคธंเคงाเคจ เคฎें เคญी เค…เคนเคฎ เคญूเคฎिเค•ा เคจिเคญाเคคे เคนैं।

เคธเคฐ เคเคฎ. เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เค•ा เคฏोเค—เคฆाเคจ

เคธเคฐ เคเคฎ. เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เค•ो เคตिเคถेเคท เคฐूเคช เคธे เคญाเคฐเคค เคฎें เคธिंเคšाเคˆ เค”เคฐ เคฌाเคข़ เคจिเคฏंเคค्เคฐเคฃ เค•े เค•्เคทेเคค्เคฐ เคฎें เค‰เคจเค•े เค…เคฆ्เคตिเคคीเคฏ เคฏोเค—เคฆाเคจ เค•े เคฒिเค เคฏाเคฆ เค•िเคฏा เคœाเคคा เคนै। เค‰เคจ्เคนोंเคจे เค•ाเคตेเคฐी เคจเคฆी เคชเคฐ เค•ृเคท्เคฃเคฐाเคœ เคธाเค—เคฐ เคฌांเคง เค•ा เคจिเคฐ्เคฎाเคฃ เค•िเคฏा, เคœो เค•เคฐ्เคจाเคŸเค• เค•े เคตिเค•ाเคธ เคฎें เคฎीเคฒ เค•ा เคชเคค्เคฅเคฐ เคธाเคฌिเคค เคนुเค†। เค‡เคธเค•े เค…เคฒाเคตा, เค‰เคจ्เคนोंเคจे เคœเคฒ เคธंเคธाเคงเคจ เคช्เคฐเคฌंเคงเคจ, เคฐेเคฒเคตे เคช्เคฐเคฃाเคฒी เค”เคฐ เคธिंเคšाเคˆ เคชเคฐिเคฏोเคœเคจाเค“ं เคฎें เคธुเคงाเคฐ เค•िเค, เคœिเคธเคธे เคญाเคฐเคค เคฎें เค‡ंเคœीเคจिเคฏเคฐिंเค— เค•े เค•्เคทेเคค्เคฐ เคฎें เค•्เคฐांเคคि เค†เคˆ।

เค…เคญिเคฏंเคคा เคฆिเคตเคธ เค•ा เคฎเคนเคค्เคต

เค…เคญिเคฏंเคคा เคฆिเคตเคธ เค•ेเคตเคฒ เคธเคฐ เคเคฎ. เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เค•ी เค‰เคชเคฒเคฌ्เคงिเคฏों เค•ा เคธเคฎ्เคฎाเคจ เค•เคฐเคจे เค•े เคฒिเค เคจเคนीं, เคฌเคฒ्เค•ि เค‡ंเคœीเคจिเคฏเคฐिंเค— เค•े เคชेเคถे เคฎें เคฒเค—े เคธเคญी เคต्เคฏเค•्เคคिเคฏों เค•ो เคช्เคฐेเคฐिเคค เค•เคฐเคจे เค•े เคฒिเค เคฎเคจाเคฏा เคœाเคคा เคนै। เคฏเคน เคฆिเคจ เคนเคฎें เคฏाเคฆ เคฆिเคฒाเคคा เคนै เค•ि เค•ैเคธे เค…เคญिเคฏंเคคा เคนเคฎाเคฐी เคœिंเคฆเค—ी เค•ो เคฌेเคนเคคเคฐ เค”เคฐ เคธुเคตिเคงाเคœเคจเค• เคฌเคจाเคจे เค•े เคฒिเค เคฒเค—ाเคคाเคฐ เคจเค-เคจเค เคธเคฎाเคงाเคจ เคขूंเคขเคคे เคนैं। เคฏเคน เคฆिเคจ เคฏुเคตाเค“ं เค•ो เค…เคญिเคฏंเคคा เคฌเคจเคจे เค•े เคฒिเค เคช्เคฐेเคฐिเคค เค•เคฐเคคा เคนै เค”เคฐ เคธเคฎाเคœ เคฎें เค‰เคจเค•े เคฏोเค—เคฆाเคจ เค•ो เคธเคฐाเคนเคจे เค•ा เค…เคตเคธเคฐ เคช्เคฐเคฆाเคจ เค•เคฐเคคा เคนै।

เคจिเคท्เค•เคฐ्เคท

เค…เคญिเคฏंเคคा เคฆिเคตเคธ เคนเคฎें เคฏเคน เคธเคฎเคเคจे เค•ा เคฎौเค•ा เคฆेเคคा เคนै เค•ि เค‡ंเคœीเคจिเคฏเคฐिंเค— เค•ा เค•्เคทेเคค्เคฐ เค•िเคคเคจा เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เคนै เค”เคฐ เค•ैเคธे เคฏเคน เคนเคฎाเคฐे เคœीเคตเคจ เค•े เคนเคฐ เคชเคนเคฒू เค•ो เคช्เคฐเคญाเคตिเคค เค•เคฐเคคा เคนै। เคนเคฎें เคธเคฐ เคเคฎ. เคตिเคถ्เคตेเคถ्เคตเคฐैเคฏा เคœैเคธे เคฎเคนाเคจ เคต्เคฏเค•्เคคिเคค्เคตों เคธे เคช्เคฐेเคฐเคฃा เคฒेเคจी เคšाเคนिเค เค”เคฐ เค‰เคจเค•े เคจเค•्เคถेเค•เคฆเคฎ เคชเคฐ เคšเคฒเคคे เคนुเค เคธเคฎाเคœ เค•े เคตिเค•ाเคธ เคฎें เคฏोเค—เคฆाเคจ เคฆेเคจा เคšाเคนिเค। เค…เคญिเคฏंเคคा เคฆिเคตเคธ เค‰เคจ เคธเคญी เค…เคญिเคฏंเคคाเค“ं เค•ा เคธเคฎ्เคฎाเคจ เค•เคฐเคจे เค•ा เคฆिเคจ เคนै เคœो เคนเคฎाเคฐे เคญเคตिเคท्เคฏ เค•ो เคธंเคตाเคฐเคจे เค•े เคฒिเค เคจिเคฐंเคคเคฐ เคช्เคฐเคฏाเคธเคฐเคค เคนैं।


Engineer’s Day

Engineer’s Day is celebrated every year on September 15 to honor the birth anniversary of the great Indian engineer, Sir Mokshagundam Visvesvaraya. Sir M. Visvesvaraya is remembered for his exceptional contributions to the field of engineering in India. He was born on September 15, 1861, and achieved unparalleled success in engineering, for which he was awarded the 'Bharat Ratna' in 1955.

Importance of Engineers

Engineers are the builders of our society. Without their hard work and technical skills, we would not be able to enjoy the conveniences of modern life. Whether it is roads, bridges, buildings, or power plants, the contribution of engineers is crucial everywhere. They not only play a vital role in construction but also in technological development, software engineering, and scientific research.

Contribution of Sir M. Visvesvaraya

Sir M. Visvesvaraya is especially remembered for his outstanding contribution to the fields of irrigation and flood control in India. He constructed the Krishna Raja Sagar Dam on the Kaveri River, which became a landmark in the development of Karnataka. In addition to this, he made significant improvements in water resource management, the railway system, and irrigation projects, bringing about a revolution in the field of engineering in India.

Significance of Engineer’s Day

Engineer’s Day is not only a day to honor the achievements of Sir M. Visvesvaraya but also to inspire all individuals engaged in the engineering profession. It reminds us of how engineers continuously seek innovative solutions to make our lives better and more convenient. This day motivates young people to become engineers and provides an opportunity to appreciate the contributions of engineers to society.

Conclusion

Engineer’s Day gives us the chance to understand how important the field of engineering is and how it affects every aspect of our lives. We should take inspiration from great personalities like Sir M. Visvesvaraya and follow in their footsteps to contribute to the development of society. Engineer’s Day is a day to honor all engineers who are tirelessly working to shape our future.

Saturday, 14 September 2024

Practical - 64 - Write a program in python to input 4 numbers if the addition of all the numbers is multiple of 5 then divide it by 5 otherwise multiply it with 10.

Practical - 64 - Write a program in python to input 4 numbers if the addition of all the numbers is multiple of 5 then divide it by 5 otherwise multiply it with 10.


Ans:

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

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

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

d=int(input("Enter fourth number: "))

sum=a+b+c+d

print("Addition of the numbers=",sum)

if sum%5==0:

    print(sum/5)

else:

    print(sum*10)

 

Output:

Enter first number: 3

Enter second number: 5

Enter third number: 8

Enter fourth number: 9

Addition of the numbers= 25

5.0


OR


Enter first number: 3

Enter second number: 5

Enter third number: 8

Enter fourth number: 7

Addition of the numbers= 23

230


Practical - 63 - Write a program in python to input 4 numbers if the multiplication of the numbers is odd then calculate its square otherwise calculate its cube.

Practical - 63 - Write a program in python to input 4 numbers if the multiplication of the numbers is odd then calculate its square otherwise calculate its cube.


Ans:

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

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

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

d=int(input("Enter fourth number: "))

m=a*b*c*d

print("Multiplication of the numbers=",m)

if m%2==1:

    print("Square=",m**2)

else:

    print("Cube=",m**3)

 

Output:

Enter first number: 3

Enter second number: 4

Enter third number: 5

Enter fourth number: 6

Multiplication of the numbers= 360

Cube= 46656000


OR


Enter first number: 1

Enter second number: 3

Enter third number: 5

Enter fourth number: 3

Multiplication of the numbers= 45

Square= 2025


Practical - 62 - Write a program in python that takes two numbers from the user and check whether 1st number is divisible by 2nd number or not. print “Divisible” if number is divisible otherwise print “Not Divisible”

Practical - 62 - Write a program in python that takes two numbers from the user and check whether 1st number is divisible by 2nd number or not. print “Divisible” if number is divisible otherwise print “Not Divisible”


Ans:

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

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

if a%b==0:

    print("Divisible")

else:

    print("Not Divisible")

 

Output:

Enter first number: 15

Enter second number: 3

Divisible

OR

Enter first number: 15

Enter second number: 4

Not Divisible