<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7011452505497426510</id><updated>2024-12-19T08:51:34.910+05:30</updated><category term="python"/><category term="#&#xa;Data Types solution in python"/><category term="#&#xa;operators solution in Python"/><category term="# Python program to print Even numbers in between x and y"/><category term="#Day 1 solution in python"/><category term="#Day 10: Binary Numbers HackerRank  solution in python"/><category term="#Day 2: Operators &#xa;hackerrank"/><category term="#Day 3 solution in python"/><category term="#Day 4: Class vs. Instance&#xa;HackerRank  solution in Python"/><category term="#Day 8: Dictionaries and Maps | HackerRank solution in python"/><category term="#Day 9: Recursion 3  HackerRank  solution in python"/><category term="#HackerRank&#xa;intro to conditional statements&#xa;day 3"/><category term="#HackerRank Day4"/><category term="#How to check for leap year in Python?"/><category term="#Largest of 3 numbers in python  solution  program"/><category term="#Printing Multiplication table in Python"/><category term="#Program to find leap Year or not in Python"/><category term="#Python Program to find sum of n natural numbers"/><category term="#Python program to display odd numbers in range x  y"/><category term="#Substraction Multiplication Division | Modulus of two numbers in python"/><category term="#addition division substraction modulus in python"/><category term="#average sum of marks of 6 subjects  average percentage  sum in python solution"/><category term="#consonants"/><category term="#day 10 hackerrank in python."/><category term="#day 8 hackerrank solution in python."/><category term="#day 9 hackerrank solution in python3."/><category term="#even numbers in python"/><category term="#even or odd  solution in python  program#"/><category term="#first n natural numbers in python"/><category term="#greatest of three numbers"/><category term="#hacker rank Day 0 python3"/><category term="#hackerrankday1&#xa;HackerRank Data Types"/><category term="#hello"/><category term="#hello world program day 0 hackerrank"/><category term="#largest number program"/><category term="#leap year program in python"/><category term="#least and highest value program in python."/><category term="#maximum and minimum program in python"/><category term="#odd numbers between m and n in python"/><category term="#odd numbers in range in python"/><category term="#percentage of marks sum of marks program solution in python"/><category term="#printing table in python"/><category term="#program even or odd"/><category term="#program to find even numbers in range in python"/><category term="#program todisplay multiplication table in python"/><category term="#python program to find natural numbers"/><category term="#python vowel consonant vowel"/><category term="#vowel consonant"/><category term="#vowel or consonant program in python"/><category term="Alphabet or not in Python | program in Python"/><category term="Area and Perimeter of Rectangle in python | program in python"/><category term="Centigrade to Fahrenheit | program in python | solution"/><category term="Day 5: Loops | HackerRank | solution in python."/><category term="Day 6: Let&#39;s Review | HackerRank | solution in python"/><category term="Day 7 hackerrank in python"/><category term="Day 7: Arrays | HackerRank | solution in python"/><category term="HackerRank Day 7"/><category term="HackerRank day5"/><category term="How do you convert cm to m in Python? How do you convert cm to m and km?&#xa;How do you convert Metres to Centimeters ?"/><category term="How do you find the perimeter of a square in Python? How do you find the area of a square in Python? How do you find area and perimeter in Python?"/><category term="How do you print first and even numbers in Python?"/><category term="Prime number or not | python | solution"/><category term="Simple intrest  | program | solution in python"/><category term="Sum of Two Integers | solution in python in C"/><category term="Sum of digits Python | 3 digit number |"/><category term="What is ternary operator in Python? What is ternary operator in Python with example?voters eligibility using  ternary operator? conditional operator in Python?"/><category term="alphabet or not"/><category term="area"/><category term="area  perimeter of rectangle rectangle program in py"/><category term="area and circumference of circle | program | python |"/><category term="area of circle in python"/><category term="character or not in python."/><category term="circumference of circle in python."/><category term="day 6"/><category term="even odd for loop."/><category term="even or odd in python"/><category term="hackerrank"/><category term="hackerrank loops"/><category term="hemisphere python"/><category term="of rectangle program in python"/><category term="perimeter"/><category term="prime or composite"/><category term="print the n odd numbers in Python using for loop?"/><category term="printing even and odd numbers in Python using while loop?"/><category term="program to find prime or not"/><category term="python code"/><category term="python swapping"/><category term="simple intrest"/><category term="simple intrest solution in python"/><category term="sum of the digits of a number in python."/><category term="sum of three digit number program"/><category term="sum of two numbers in python"/><category term="sum of two nums in python and c"/><category term="swapping"/><category term="swapping numbers"/><category term="swapping of two integers in python"/><category term="swapping of two nums"/><category term="volume of sphere and hemisphere in Python"/><category term="volume of sphere python"/><category term="word or not"/><category term="world solution in Python3"/><category term="write a program to input the radius of a sphere and calculate its volume in python"/><title type='text'>TryMyCode</title><subtitle type='html'>Programming for everybody...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6482178111496820427</id><published>2021-07-23T06:40:00.005+05:30</published><updated>2021-07-25T16:34:46.952+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="# Python program to print Even numbers in between x and y"/><category scheme="http://www.blogger.com/atom/ns#" term="#even numbers in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#program to find even numbers in range in python"/><title type='text'> Python program to print Even numbers in between x and y</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFOa5pyOMMOwii5pkPhiY81LrDTya0E6r7cKAnAcCH6ljcf_Xc5r8Wfoo7zafO3hKsDzcEyNnunVhDWZic-hYmAijFf8nz7wHr1Sh8GruSeYT8vE45si1HVLveeBAEfPlo4k5CiWtqjeY/s2048/PicsArt_07-05-12.10.32.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Python program to print Even numbers in between x and y.&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Even numbers:&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The numbers which are&amp;nbsp; divisible by 2 or the numbers whose remainder is&amp;nbsp; 0 are called even numbers.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter x value 1&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter y value 7&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&amp;nbsp;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;even numbers between 1 and 7 are&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;2&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;4&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;6 &lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Python program to display even numbers in range x , y &lt;br /&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program to print even numbers in range x and y
x=int(input(&quot;enter x &quot;))
y=int(input(&quot;enter y &quot;))
print(f&quot;even numbers in between{x} and {y} are &quot;)
for i in range(x,y):
    if i%2==0:
        print(i) #use i,end=&#39; &#39; to get output in single line&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter x 1
enter y 7
even numbers in between1 and 5 are 
2
4
6&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6482178111496820427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-print-even-numbers-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6482178111496820427'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6482178111496820427'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-print-even-numbers-in.html' title=' Python program to print Even numbers in between x and y'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFOa5pyOMMOwii5pkPhiY81LrDTya0E6r7cKAnAcCH6ljcf_Xc5r8Wfoo7zafO3hKsDzcEyNnunVhDWZic-hYmAijFf8nz7wHr1Sh8GruSeYT8vE45si1HVLveeBAEfPlo4k5CiWtqjeY/s72-c/PicsArt_07-05-12.10.32.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-4001370091167286371</id><published>2021-07-22T06:22:00.039+05:30</published><updated>2021-07-25T16:32:56.166+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#odd numbers between m and n in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#odd numbers in range in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#Python program to display odd numbers in range x  y"/><title type='text'>Python program to display odd numbers in range x , y</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAmAXLd2l_emmpeCtCUupd0jmJgp2d6Np3WXugQ1kjGNKzjbzo6zvcwJB19YeCIjIE6rSdFUmuWBYYqkUy8EFF7RFYT-ua8u0ik98A0YuOMTT7_pL0RgkJHPMGMzZg3x0eKfCMe0dp3NY/s2048/PicsArt_07-05-12.09.45.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Python program to print odd numbers in between x and y.&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Odd numbers:&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The numbers which are not divisible by 2 or the numbers whose remainder is&amp;nbsp; 1 are called odd numbers.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter x value&amp;nbsp; 5&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter y value 10&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&amp;nbsp;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;odd numbers between 5 and 10 are&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;5 7 9&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Python program to display odd numbers in range x , y &lt;br /&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program to print odd numbers in range x and y
x=int(input(&quot;enter x &quot;))
y=int(input(&quot;enter y &quot;))
print(f&quot;odd numbers in between{x} and {y} are &quot;)
for i in range(x,y):
    if i%2!=0:
        print(i) #use i,end=&#39; &#39; to get output in single line&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter x 5
enter y 10
odd numbers in between1 and 5 are 
5
7
9&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/4001370091167286371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-display-odd-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4001370091167286371'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4001370091167286371'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-display-odd-numbers.html' title='Python program to display odd numbers in range x , y'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAmAXLd2l_emmpeCtCUupd0jmJgp2d6Np3WXugQ1kjGNKzjbzo6zvcwJB19YeCIjIE6rSdFUmuWBYYqkUy8EFF7RFYT-ua8u0ik98A0YuOMTT7_pL0RgkJHPMGMzZg3x0eKfCMe0dp3NY/s72-c/PicsArt_07-05-12.09.45.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-3122602391178195571</id><published>2021-07-22T05:50:00.020+05:30</published><updated>2021-07-25T16:31:44.409+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#first n natural numbers in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#python program to find natural numbers"/><category scheme="http://www.blogger.com/atom/ns#" term="#Python Program to find sum of n natural numbers"/><title type='text'>Python Program to find sum of n natural numbers</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9TgNUNYR-NoUWkKHo8BKhdDphSzLAGz1VV3bFXuL1j55hg7lUCuRUR9ALUygTE2qv2sbyfBP1jjCp41wiUSRLIj36w4b0elq63itO81TtoMggoBcOJh1oPkOJdsLnJQSeAkA2qxxrIho/s2048/PicsArt_07-05-12.08.52.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Sum of n natural numbers&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Natural number :&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;All positive integers are natural numbers.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input : &lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter n value 20&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Output :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;sum of 20 natural numbers is 210 &lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Python Program to find sum of n natural numbers&lt;br /&gt;&lt;/h2&gt;&lt;pre&gt;&lt;code&gt;#program to find n natural numbers
n=int(input(&quot;enter &quot;))
nsum=0
if n &amp;gt;1:
    for i in range(1,n+1):
        nsum+=i
    print(f&quot;sum of {n} natural numbers is {nsum}&quot;)
else:
    print(&quot;enter a natural number&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter 20
sum of 20 natural numbers is 210&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter -3
enter a natural number&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/3122602391178195571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-find-sum-of-n-natural.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3122602391178195571'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3122602391178195571'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/python-program-to-find-sum-of-n-natural.html' title='Python Program to find sum of n natural numbers'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9TgNUNYR-NoUWkKHo8BKhdDphSzLAGz1VV3bFXuL1j55hg7lUCuRUR9ALUygTE2qv2sbyfBP1jjCp41wiUSRLIj36w4b0elq63itO81TtoMggoBcOJh1oPkOJdsLnJQSeAkA2qxxrIho/s72-c/PicsArt_07-05-12.08.52.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6100734333468327706</id><published>2021-07-21T09:59:00.015+05:30</published><updated>2021-07-21T19:10:08.227+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#How to check for leap year in Python?"/><category scheme="http://www.blogger.com/atom/ns#" term="#leap year program in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#Program to find leap Year or not in Python"/><title type='text'>Program to find leap Year or not in Python</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRzIYixBofI_s1tzbqw3Xl3lGF_UplFfna7l1TP_4HDNkiWq9P4DiShZ2vUfxA9kst4BBBGajDCfjbD8axjS9jBMihzEebl9Vj4FjGEleLbhi5jk_F0lmtMJ-y8nkhXCEj8qT5RhEojmc/s2048/PicsArt_07-05-12.08.07.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;What is a Leap year ?&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Generally&amp;nbsp; we have 28 days in the month of February and overall 365 days in a year. But a leap year have 29 days in the month of February and overall 366 days in a year. For every four years we get a leap year. &lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Conditions to be a leap Year.&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Year divisible by 4 is a leap year until it is not divisible by 100 (century year{year ends with 00} is not a leap year until it is divisible by 400, if it is divisible by 400 then it is a leap year.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Explanation :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;For a non century year&amp;nbsp; if year divisible by 4 then it is a leap year.&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;For a non century year&amp;nbsp; if year not divisible by 4 then it is not a leap year.&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;If year is a century year then it is not a leap year.&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Century year is said to be a leap year if it is divisible by 400 .&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Input :&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter a year 2400&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Output :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;2400 is a leap year&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Program to find leap Year or not in Python&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;
#program to say leap year or not
year=int(input(&quot;enter a year &quot;))
if year%4==0:
    if year%100==0:
        if year%400==0:
            print(year,&quot;is a leap year.&quot;)
        else:
            print(year,&quot;is not a leap year.&quot;)
    else:
        print(year,&quot;is a leap year.&quot;)
else:
    print(year,&quot;is not a leap year.&quot;)
    
#----method 2------using ternary operator---------#
year=int(input())
print(&quot;leap year&quot;if (year%4==0) else &quot;not a leap year&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter a year 2400
2400 is a leap year.&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6100734333468327706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/program-to-find-leap-year-or-not-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6100734333468327706'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6100734333468327706'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/program-to-find-leap-year-or-not-in.html' title='Program to find leap Year or not in Python'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRzIYixBofI_s1tzbqw3Xl3lGF_UplFfna7l1TP_4HDNkiWq9P4DiShZ2vUfxA9kst4BBBGajDCfjbD8axjS9jBMihzEebl9Vj4FjGEleLbhi5jk_F0lmtMJ-y8nkhXCEj8qT5RhEojmc/s72-c/PicsArt_07-05-12.08.07.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-3266136987439418520</id><published>2021-07-20T05:14:00.093+05:30</published><updated>2021-07-20T14:10:09.947+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#Printing Multiplication table in Python"/><category scheme="http://www.blogger.com/atom/ns#" term="#printing table in python"/><category scheme="http://www.blogger.com/atom/ns#" term="#program todisplay multiplication table in python"/><title type='text'>Printing Multiplication table in Python </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO0LLq6ERWPyD2m19Tyram7S93ziYs3ZGMPeiLuTuyftwRvPp7E4BD_jxFRNd6RjDtTICVw0WYZHo-3WRbbAaKvgM0GJDWvojk7vPA5GenHtZIxMk0YB4JrUq19HAJyl6TfMU_f6q4OcQ/s2048/PicsArt_07-05-12.07.16.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Display Multiplication table in Python &lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Read an integer using input() function.&lt;/span&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;/li&gt;&lt;li&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;print(f&quot;Multiplication table of {number} is&quot;) &lt;/span&gt;&lt;/h2&gt;&lt;/li&gt;&lt;li&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Use for loop to iterate multiplication for 10 times.&lt;/span&gt;&lt;/h2&gt;&lt;/li&gt;&lt;li&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;print(number,&quot;*&quot;,i,&quot;=&quot;,number*i).&lt;/span&gt;&lt;/h2&gt;&lt;/li&gt;&lt;li&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;As a result we get the output as a multiplication table of number.&lt;/span&gt;&lt;/h2&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Input:&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;enter any integer : 5&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Output :&amp;nbsp;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;5 * 1 = 5&lt;br /&gt;5 * 2 = 10&lt;br /&gt;5 * 3 = 15&lt;br /&gt;5 * 4 = 20&lt;br /&gt;5 * 5 = 25&lt;br /&gt;5 * 6 = 30&lt;br /&gt;5 * 7 = 35&lt;br /&gt;5 * 8 = 40&lt;br /&gt;5 * 9 = 45&lt;br /&gt;5 * 10 = 50&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Program to display multiplication table in python.&lt;/span&gt;&lt;/h2&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;pre&gt;&lt;code&gt;#Multiplication table in python
number=int(input(&quot;enter any integer &quot;))
print(f&quot;Multiplication table of {number} is&quot;)
for i in range(1,11):
    print(f&#39;{number}*{i}={number*i}&#39;)
#---------without format specifiers---------#
for i in range(1,11):
    print(number,&quot;*&quot;,i,&quot;=&quot;,number*i)
    
&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter any integer 5
Multiplication table of 5 is
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 &lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/3266136987439418520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/printing-multiplication-table-in-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3266136987439418520'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3266136987439418520'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/printing-multiplication-table-in-python.html' title='Printing Multiplication table in Python '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO0LLq6ERWPyD2m19Tyram7S93ziYs3ZGMPeiLuTuyftwRvPp7E4BD_jxFRNd6RjDtTICVw0WYZHo-3WRbbAaKvgM0GJDWvojk7vPA5GenHtZIxMk0YB4JrUq19HAJyl6TfMU_f6q4OcQ/s72-c/PicsArt_07-05-12.07.16.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-3505143175395546331</id><published>2021-07-19T06:14:00.024+05:30</published><updated>2021-07-20T14:08:59.989+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="even odd for loop."/><category scheme="http://www.blogger.com/atom/ns#" term="How do you print first and even numbers in Python?"/><category scheme="http://www.blogger.com/atom/ns#" term="print the n odd numbers in Python using for loop?"/><category scheme="http://www.blogger.com/atom/ns#" term="printing even and odd numbers in Python using while loop?"/><title type='text'>Printing first n even and odd numbers in Python using for loop</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbQ2NJur-WGZDpCVapiqig72CGtPiYViE99ptRSCk6g_r3XBoD7h-T_n3fnAmH7HQt2tZSYn_0LjE_gBiFlOpqjxVwnOpjcEw8VQFlSDiWrfFxrA69t-JfgBdehVzjjs6OavH8gIy-tlk/s2048/PicsArt_07-05-12.05.35.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: medium;&quot;&gt;for Loop in Python&lt;/span&gt;&lt;br /&gt;&lt;/h2&gt;&lt;p&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&lt;u&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;for&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;loop&lt;/span&gt;&lt;/u&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;-- Executes a sequence of statements multiple times and abbreviates the code that manages the&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;loop&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;variable.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/h3&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124; font-size: medium;&quot;&gt;&lt;span&gt;even and odd numbers&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: medium;&quot;&gt;An&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;even number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;that can be divisible by 2.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: medium;&quot;&gt;&amp;nbsp;&lt;b&gt;Even numbers&lt;/b&gt;&amp;nbsp;are&amp;nbsp; 2, 4, 6, 8 and so on.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: medium;&quot;&gt;&amp;nbsp;An&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;odd number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;that cannot be divisible by 2.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;Odd numbers&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;are&amp;nbsp;1, 3, 5, 7, 9 so on.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124; font-size: medium;&quot;&gt;Program to print first 10 even and odd numbers using for&amp;nbsp; loop.&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124; font-size: medium;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;color: #202124; font-size: medium;&quot;&gt;how many even and odd nums you want 5&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124; font-size: medium;&quot;&gt;Output :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;color: #202124; font-size: medium;&quot;&gt;&lt;div&gt;first 5 even nums are&amp;nbsp;&lt;/div&gt;&lt;div&gt;2 4 6 8 10&amp;nbsp;&lt;/div&gt;&lt;div&gt;first 5 odd nums are&amp;nbsp;&lt;/div&gt;&lt;div&gt;1 3 5 7 9&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;# Program to print first n even and odd numbers using for  loop.
choice = int(input(&quot;how many even and odd nums you want &quot;))
n=(choice*2)+1
print(&quot;first&quot;,choice,&quot;even nums are &quot;)
for i in range(1,n):
    if i%2 == 0:
        print(i,end=&quot; &quot;)
print(&quot;\nfirst&quot;,choice,&quot;odd nums are &quot;)
for i in range(1,n):  
    if i%2!=0:
        print(i,end=&quot; &quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;first 5 even nums are 
2 4 6 8 10 
first 5 odd nums are 
1 3 5 7 9&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/3505143175395546331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/printing-first-n-even-and-odd-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3505143175395546331'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/3505143175395546331'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/printing-first-n-even-and-odd-numbers.html' title='Printing first n even and odd numbers in Python using for loop'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbQ2NJur-WGZDpCVapiqig72CGtPiYViE99ptRSCk6g_r3XBoD7h-T_n3fnAmH7HQt2tZSYn_0LjE_gBiFlOpqjxVwnOpjcEw8VQFlSDiWrfFxrA69t-JfgBdehVzjjs6OavH8gIy-tlk/s72-c/PicsArt_07-05-12.05.35.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-4096339619653585042</id><published>2021-07-17T05:46:00.005+05:30</published><updated>2021-07-17T18:11:54.966+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="hemisphere python"/><category scheme="http://www.blogger.com/atom/ns#" term="volume of sphere and hemisphere in Python"/><category scheme="http://www.blogger.com/atom/ns#" term="volume of sphere python"/><category scheme="http://www.blogger.com/atom/ns#" term="write a program to input the radius of a sphere and calculate its volume in python"/><title type='text'>volume of sphere and hemisphere in Python | program </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMtnRs9aW5lMMlb5kHUx8VN69GfGKk6J4XJAa3A0DiNW1KW8HJ5uRtcTpALc0agEq63UFYKWAahcldJrJJ-QbfKfG5QFb-Oame4jRMzAQZks709TnlX9xN2Irx8eHbLNmVKP8Oa14laQk/s2048/PicsArt_07-05-12.04.26.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;volume of sphere and hemisphere.&lt;/h1&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;Volume&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;of&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;hemisphere&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;= 2πr&lt;/span&gt;&lt;sup style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;3&lt;/sup&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;/3, where &#39;r&#39; is the radius of the&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;hemisphere&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;Volume&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;of&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;sphere&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&amp;nbsp;= 4πr&lt;/span&gt;&lt;sup style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;3&lt;/sup&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;/3, where &#39;r&#39; is the radius of the&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif;&quot;&gt;sphere&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124; font-size: medium;&quot;&gt;Program to find volume of sphere and hemisphere&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124; font-size: medium;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;enter radius of sphere 4&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;enter radius of hemisphere 4&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3 style=&quot;color: black; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;Output :&lt;/code&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;volume of sphere is %.2f 268.08&lt;/code&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;volume of hemisphere is  134.04&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;# Program to find volume of sphere and hemisphere
# for pi use pi value as 3.1423 or import math module
from math import*
#Program to find volume of sphere
radius1 = float(input(&quot;enter radius of sphere &quot;))
vol_sphere = (4*pi*radius1*radius1*radius1)/3
print(&quot;volume of sphere is %.2f&quot;,round(vol_sphere,2))
#Program to find volume of hemisphere
radius2 = float(input(&quot;enter radius of hemisphere &quot;))
vol_hemisphere = (2*pi*radius2*radius2*radius2)/3
print(&quot;volume of hemisphere is &quot;,round(vol_hemisphere,2))
#here round(var,n) is predefined function used to get n digits after point
&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter radius of sphere 4
volume of sphere is %.2f 268.08
enter radius of hemisphere 4
volume of hemisphere is  134.04
&amp;gt; &lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/4096339619653585042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/volume-of-sphere-and-hemisphere-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4096339619653585042'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4096339619653585042'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/volume-of-sphere-and-hemisphere-in.html' title='volume of sphere and hemisphere in Python | program '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMtnRs9aW5lMMlb5kHUx8VN69GfGKk6J4XJAa3A0DiNW1KW8HJ5uRtcTpALc0agEq63UFYKWAahcldJrJJ-QbfKfG5QFb-Oame4jRMzAQZks709TnlX9xN2Irx8eHbLNmVKP8Oa14laQk/s72-c/PicsArt_07-05-12.04.26.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6319065895443833772</id><published>2021-07-16T06:10:00.049+05:30</published><updated>2021-07-17T18:10:45.260+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="How do you convert cm to m in Python? How do you convert cm to m and km?&#xa;How do you convert Metres to Centimeters ?"/><title type='text'>Program to Convert Centimeter to meter and kilometer in python</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpqA0JBefGYJoMb4BSDTR3EpoIXzO48NJyqUetMJ6XWi4uqWBMLCX61bs8Zb5Vn9pXMIIxOX77wSvdfoELuh3X7O00Et78LI3ZegZufYiAMLb1bGHPgAq0sv5W-7nTkdJ3HXYvi0rMyGA/s2048/PicsArt_07-05-12.03.43.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Convert Centimeter to meter and kilometer.&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;1 meter&amp;nbsp; = 100 centimeters&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;1 kilometer = 100000 centimeters&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Read the length in centimeters.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;use formulae and get the output.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;check the below code .&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Program to Convert Centimeter to meter and kilometer&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;pre&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;enter length in centimeters 100&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;Output :&lt;/code&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;code&gt;&lt;pre&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code&gt;100.0  centimeters =  1.0  meters.
100.0  centimeters =  1e-05  kilometers.&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;# program to convert centimeter to meter and kilometer
cm = float(input(&quot;enter length in centimeters &quot;))
# centimeter to meter
meter = 0.01*cm
print(cm,&quot; centimeters = &quot;,meter,&quot; meters.&quot;)
# centimeter to kilometer
km = 0.00001
print(cm,&quot; centimeters = &quot;,km,&quot; kilometers.&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter length in centimeters 100
100.0  centimeters =  1.0  meters.
100.0  centimeters =  1e-05  kilometers.&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6319065895443833772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/program-to-convert-centimeter-to-meter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6319065895443833772'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6319065895443833772'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/program-to-convert-centimeter-to-meter.html' title='Program to Convert Centimeter to meter and kilometer in python'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpqA0JBefGYJoMb4BSDTR3EpoIXzO48NJyqUetMJ6XWi4uqWBMLCX61bs8Zb5Vn9pXMIIxOX77wSvdfoELuh3X7O00Et78LI3ZegZufYiAMLb1bGHPgAq0sv5W-7nTkdJ3HXYvi0rMyGA/s72-c/PicsArt_07-05-12.03.43.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-7296592116026254960</id><published>2021-07-15T05:37:00.066+05:30</published><updated>2021-07-17T18:08:17.191+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="What is ternary operator in Python? What is ternary operator in Python with example?voters eligibility using  ternary operator? conditional operator in Python?"/><title type='text'>Ternary operator in python | voter eligibility using ternary operator in python.</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizxSfIS58BlbUn3RVk5_3jiCTPwlxs_QPtomcCYKJzoX2Bbz59kX50HijEm4U5Fq2epcKG_GkaZ1iPfMy69zVjRCMkPSxmLXt3QmsZG4QAGW2lMQAO0wr73pYDQLGHgB5m5w5BXvDMkaw/s2048/PicsArt_07-05-12.02.12.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Ternary operator&lt;/h1&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Ternary operator also known as conditional expression operator.&lt;/li&gt;&lt;li&gt;Checks for the condition and then evaluates true or false.&lt;/li&gt;&lt;li&gt;It has very simple syntax of single with (if else) conditional statements.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Syntax of ternary operator :&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;[true_statement] if [expression] else[false_statement]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Voter eligibility using ternary operator&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Read age from the user.&lt;/li&gt;&lt;li&gt;follow syntax&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program on voter eligibility using ternary operator in python.&lt;/h3&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;div&gt;enter your age 16&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&lt;/h3&gt;&lt;div&gt;You are not eligible.&lt;/div&gt;&lt;pre&gt;&lt;code&gt;# program to print voter eligibility using ternary operator
age=int(input(&quot;enter your age &quot;))
print(&quot;You are eligible&quot;if age&amp;gt;18 else &quot;You are not eligible&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter your age 16
You are not eligible.&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/7296592116026254960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/ternary-operator-in-python-voter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7296592116026254960'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7296592116026254960'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/ternary-operator-in-python-voter.html' title='Ternary operator in python | voter eligibility using ternary operator in python.'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizxSfIS58BlbUn3RVk5_3jiCTPwlxs_QPtomcCYKJzoX2Bbz59kX50HijEm4U5Fq2epcKG_GkaZ1iPfMy69zVjRCMkPSxmLXt3QmsZG4QAGW2lMQAO0wr73pYDQLGHgB5m5w5BXvDMkaw/s72-c/PicsArt_07-05-12.02.12.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-4328589987506660948</id><published>2021-07-14T04:50:00.046+05:30</published><updated>2021-07-17T18:06:49.447+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="How do you find the perimeter of a square in Python? How do you find the area of a square in Python? How do you find area and perimeter in Python?"/><title type='text'>Area and Perimeter of Square Program in Python </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk9VlCN2hq8JrtVRpN_1vBWRlQab285AXu5ts33qVuwBvNofaigpUtHUHh3quCR2NGXEUuTobY-QLoh756vlf4wSbL1VC6E1N-Dshzg8T7cIX6DuCGkgUDoiTjLonn3SehRLYiXwpG1UM/s2048/PicsArt_07-05-12.01.19.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Area and Perimeter of Square&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Area of square is side*side&lt;/li&gt;&lt;li&gt;Perimeter of a square is 4*side or (side + side + side + side)&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Steps :&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Read one&amp;nbsp; side of a square.&lt;/li&gt;&lt;li&gt;we know that in square all sides are equal.&lt;/li&gt;&lt;li&gt;substitute the side value in above formulae to obtain area and perimeter.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;div&gt;enter a side 4&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&lt;/h3&gt;&lt;div&gt;&lt;div&gt;Area is&amp;nbsp; 16&lt;/div&gt;&lt;div&gt;Perimeter is&amp;nbsp; 16&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Program to find area and perimeter of a square in python.&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;#program to print area and perimeter of a square.
side=int(input(&quot;enter a side &quot;))
#area of square side*side
area = side*side
print(&quot;Area is &quot;,area)
#perimeter of a square.
perimeter = 4*side
print(&quot;Perimeter is &quot;,perimeter)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter a side 4
Area is  16
Perimeter is  16&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/4328589987506660948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-perimeter-of-square-program-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4328589987506660948'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4328589987506660948'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-perimeter-of-square-program-in.html' title='Area and Perimeter of Square Program in Python '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk9VlCN2hq8JrtVRpN_1vBWRlQab285AXu5ts33qVuwBvNofaigpUtHUHh3quCR2NGXEUuTobY-QLoh756vlf4wSbL1VC6E1N-Dshzg8T7cIX6DuCGkgUDoiTjLonn3SehRLYiXwpG1UM/s72-c/PicsArt_07-05-12.01.19.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-8002719619749937977</id><published>2021-07-13T06:52:00.004+05:30</published><updated>2021-07-17T18:05:56.947+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="area"/><category scheme="http://www.blogger.com/atom/ns#" term="area  perimeter of rectangle rectangle program in py"/><category scheme="http://www.blogger.com/atom/ns#" term="Area and Perimeter of Rectangle in python | program in python"/><category scheme="http://www.blogger.com/atom/ns#" term="of rectangle program in python"/><category scheme="http://www.blogger.com/atom/ns#" term="perimeter"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Area and Perimeter of Rectangle in python | program in python</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjER6WwsnrisSJt2nqD6bplJ9uOdBsp0r7Az5Awqn29JmLnRqWQV8sLOD6bXFJgLZ-S69J_AXJiQMd64E-7FiiowxDHtuzamfgDaHOMnAOgbgemZaPrzF29DtBeHF0f7kNAYqXD7ABPJR4/s2048/PicsArt_07-05-12.00.15.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Area and Perimeter of a Rectangle.&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;All&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;rectangles&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;are also parallelograms, but not all parallelograms are&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;rectangles&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;. The&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;perimeter&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;P of a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;rectangle&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is given by the formula, P=2l+2w&amp;nbsp; or 2(l + w), where l is the length and w is the width of the&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;rectangle&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;. The&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;area&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;A of a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;rectangle&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is given by the formula, A=l*w , where l is the length and w is the width.&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Input :&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;enter length 12&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;enter breadth 10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Output:&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;area is 120&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;perimeter is 44&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Program to find area and perimeter of a rectangle.&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;#program to print area and perimeter of rectangle.  
length = int(input(&quot;enter length &quot;))
breadth = int(input(&quot;enter breadth &quot;))
#area of rectangle = l*b
area = length * breadth
print(&quot;area is &quot;,area)
#perimeter of rectangle= 2(l+b)
perimeter=2*(length+breadth)
print(&quot;perimeter is &quot;,perimeter)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter length 12
enter breadth 10
area is  120
perimeter is  44&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/8002719619749937977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-perimeter-of-rectangle-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8002719619749937977'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8002719619749937977'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-perimeter-of-rectangle-in.html' title='Area and Perimeter of Rectangle in python | program in python'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjER6WwsnrisSJt2nqD6bplJ9uOdBsp0r7Az5Awqn29JmLnRqWQV8sLOD6bXFJgLZ-S69J_AXJiQMd64E-7FiiowxDHtuzamfgDaHOMnAOgbgemZaPrzF29DtBeHF0f7kNAYqXD7ABPJR4/s72-c/PicsArt_07-05-12.00.15.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-5281910130503872132</id><published>2021-07-12T06:25:00.030+05:30</published><updated>2021-07-17T18:04:24.323+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sum of digits Python | 3 digit number |"/><category scheme="http://www.blogger.com/atom/ns#" term="sum of the digits of a number in python."/><category scheme="http://www.blogger.com/atom/ns#" term="sum of three digit number program"/><title type='text'>Sum of digits Python | 3 digit number |</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhAyqB_AyIwHlWEC7sg6m2ODKrqVnaNyiqy0UgHyH3KcZ40fzw0opzUt_mwLLa6VwdQcbEaZ3G_upMYqxsXzZy_AVjv7S6b-V8P0iBL6ip1m6uuKI6jfuOzU3av-FIY8jDFgbkZjuCTVI/s2048/PicsArt_07-05-02.01.45.jpg&quot; style=&quot;display: none;&quot; /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;Sum of the&amp;nbsp; digits.&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input:&lt;/h3&gt;&lt;div&gt;enter a digit 123&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&lt;/h3&gt;&lt;div&gt;sum of the digits is 6.&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Program to print Sum of the&amp;nbsp; digits.&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;#program to print sum of the digits  
digit =int(input(&quot;enter a digit &quot;))
sum1=0
while (digit!=0):
    remainder = digit % 10
    sum1+=remainder
    digit//=10
print(&quot;sum of the digits is &quot;,sum1)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output:&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter a digit 123
sum of the digits is  6.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/5281910130503872132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-digits-python-3-digit-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/5281910130503872132'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/5281910130503872132'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-digits-python-3-digit-number.html' title='Sum of digits Python | 3 digit number |'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhAyqB_AyIwHlWEC7sg6m2ODKrqVnaNyiqy0UgHyH3KcZ40fzw0opzUt_mwLLa6VwdQcbEaZ3G_upMYqxsXzZy_AVjv7S6b-V8P0iBL6ip1m6uuKI6jfuOzU3av-FIY8jDFgbkZjuCTVI/s72-c/PicsArt_07-05-02.01.45.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-8979699368094921786</id><published>2021-07-11T06:09:00.046+05:30</published><updated>2021-07-11T22:36:27.205+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="alphabet or not"/><category scheme="http://www.blogger.com/atom/ns#" term="Alphabet or not in Python | program in Python"/><category scheme="http://www.blogger.com/atom/ns#" term="character or not in python."/><category scheme="http://www.blogger.com/atom/ns#" term="word or not"/><title type='text'>Alphabet or not in Python | program in Python</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1KRUvp2rPfYGWpmt0BkYVXN1aXv4Yh8C_uROJhDzvXbn7PD1sAF7a9XfUx3hNFH2e8l84WNLtn2ZLo6PsJVqUikwK9L2sk5hdqPanB2cGbKye_yAiUi9V8LJ0Wi9lfPfIdJG1Eb6Xk_c/s2048/PicsArt_07-04-11.58.27.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Alphabet or Not program in Python&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;We can use isalpha() function which is predefined in python.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;enter 56&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Output :&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;56 is not alphabet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;enter f&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Output :&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;f is alphabet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Program to print alphabet or not using Python&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program to print alphabet or not  
ch =input(&quot;enter &quot;)
#ch.isalpha() is a predefined python fuction to check alphabet or not
if ch.isalpha():
    print(ch,&quot;is Alphabet.&quot;)
else:
    print(ch,&quot;is not Alphabet.&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output:&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter 56
56 is not Alphabet.&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;enter f
f is Alphabet.&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/8979699368094921786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/alphabet-or-not-in-python-program-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8979699368094921786'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8979699368094921786'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/alphabet-or-not-in-python-program-in.html' title='Alphabet or not in Python | program in Python'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1KRUvp2rPfYGWpmt0BkYVXN1aXv4Yh8C_uROJhDzvXbn7PD1sAF7a9XfUx3hNFH2e8l84WNLtn2ZLo6PsJVqUikwK9L2sk5hdqPanB2cGbKye_yAiUi9V8LJ0Wi9lfPfIdJG1Eb6Xk_c/s72-c/PicsArt_07-04-11.58.27.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-4746211549718149710</id><published>2021-07-10T06:48:00.005+05:30</published><updated>2021-07-11T22:32:16.349+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#consonants"/><category scheme="http://www.blogger.com/atom/ns#" term="#python vowel consonant vowel"/><category scheme="http://www.blogger.com/atom/ns#" term="#vowel consonant"/><category scheme="http://www.blogger.com/atom/ns#" term="#vowel or consonant program in python"/><category scheme="http://www.blogger.com/atom/ns#" term="python code"/><title type='text'>Vowel or Consonant in python  | python solution | </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLaoDWGkiaW2QyjLzOFcOBcPVNyJ_SbNpR30tO11z3HVGDcoHNh7Uky9Wd2sdtoV98e_Gj8y6MjuV4kagxUG8FCONoMKEcwYTlIKUvrb7FmXa-AxR9J1aOunIrEVySVq5BIL1Y9ZpoNpQ/s2048/PicsArt_07-04-11.57.30.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Vowel and Consonant Program in python&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;The alphabet is made up of 26 letters, 5 of which are&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;vowels&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;(a, e, i, o, u) and the rest of which are&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;consonants&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;. A&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;vowel&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is a sound that is made by allowing breath to flow out of the mouth, without closing any part of the mouth or throat.&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Input :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;enter an alphabet D&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Output :&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;D is a consonant&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Program to print vowel or consonant in python.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program to print vowel or consonant 
char = input(&quot;enter any alphabet &quot;)
check = char.lower()
#char.lower() function converts char to lower letter
if (check==&quot;a&quot; or check==&quot;e&quot; or check==&quot;i&quot; or check==&quot;o&quot; or check==&#39;u&#39;):
    print(char,&quot; is vowel.&quot;)
else:
    print(char,&quot; is consonant.&quot;)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter any alphabet D
D  is consonant.&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/4746211549718149710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/vowel-or-consonant-in-python-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4746211549718149710'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/4746211549718149710'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/vowel-or-consonant-in-python-python.html' title='Vowel or Consonant in python  | python solution | '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLaoDWGkiaW2QyjLzOFcOBcPVNyJ_SbNpR30tO11z3HVGDcoHNh7Uky9Wd2sdtoV98e_Gj8y6MjuV4kagxUG8FCONoMKEcwYTlIKUvrb7FmXa-AxR9J1aOunIrEVySVq5BIL1Y9ZpoNpQ/s72-c/PicsArt_07-04-11.57.30.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6323303339686631246</id><published>2021-07-09T06:15:00.088+05:30</published><updated>2021-07-09T13:57:32.974+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#greatest of three numbers"/><category scheme="http://www.blogger.com/atom/ns#" term="#largest number program"/><category scheme="http://www.blogger.com/atom/ns#" term="#Largest of 3 numbers in python  solution  program"/><category scheme="http://www.blogger.com/atom/ns#" term="#least and highest value program in python."/><category scheme="http://www.blogger.com/atom/ns#" term="#maximum and minimum program in python"/><title type='text'>Largest and smallest of 3 numbers in python | solution | program</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiITGuTeRRRh3Q_yZLtzy7rKPFL6WSKMYWe9JhUQB_Lt4sXPkZvatKGxHvOElUNMh9jLnp_vXMGFdsAqqn3M8enGlqEz39yax5VzUzBudSmGWSX7PkNL08SqyblFKDaJ6_ukMX2roM8TF4/s2048/PicsArt_07-04-11.56.45.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Largest&amp;nbsp; among 3 numbers&lt;/h2&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Read three integers a, b and c.&lt;/li&gt;&lt;li&gt;use control structures (if , elif, else) to check the condition.&lt;/li&gt;&lt;li&gt;if a is greater than b and a&amp;nbsp;&amp;nbsp;is greater than&amp;nbsp;c then print- a is greater value.&lt;/li&gt;&lt;li&gt;if b is greater than a and b&amp;nbsp; is greater than&amp;nbsp;c then print- b is greater value.&lt;/li&gt;&lt;li&gt;if c is greater than b and c&amp;nbsp; is greater than a then print- c is greater value.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Least among 3 numbers&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;use control structures (if , elif, else) to check the condition.&lt;/li&gt;&lt;li&gt;if a is smaller than b and a&amp;nbsp;&amp;nbsp;is smaller than&amp;nbsp;c then print- a is smaller value.&lt;/li&gt;&lt;li&gt;if b is smaller than a and b&amp;nbsp; is smaller than&amp;nbsp;c then print- b is smaller value.&lt;/li&gt;&lt;li&gt;if c is smaller than b and c&amp;nbsp; is smaller than a then print- c is smaller value.&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;div&gt;a =10&lt;/div&gt;&lt;div&gt;b=20&lt;/div&gt;&lt;div&gt;c=5&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&lt;/h3&gt;&lt;div&gt;b is greater value&lt;/div&gt;&lt;div&gt;c is least value&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Program in python&amp;nbsp;&lt;/h3&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;#program to print largest and least value 
a=int(input(&quot;enter first num &quot;))
b=int(input(&quot;enter second num &quot;))
c=int(input(&quot;enter third num &quot;))
# greatest or largest value
if(a&amp;gt;b and a&amp;gt;c):
    print(&quot;a is greater value&quot;)
elif(b&amp;gt;a and b&amp;gt;c):
    print(&quot;b is greater value&quot;)
else:
    print(&quot;c is greater value&quot;)
#smallest or least value
if(a&lt;b a=&quot;&quot; and=&quot;&quot; b=&quot;&quot; c=&quot;&quot; code=&quot;&quot; elif=&quot;&quot; else:=&quot;&quot; is=&quot;&quot; least=&quot;&quot; print=&quot;&quot; value=&quot;&quot;&gt;&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output : &lt;/h4&gt;&lt;pre&gt;&lt;code&gt;enter first num 10
enter second num 20
enter third num 5
b is greater value
c is least value&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6323303339686631246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/largest-and-smallest-of-3-numbers-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6323303339686631246'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6323303339686631246'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/largest-and-smallest-of-3-numbers-in.html' title='Largest and smallest of 3 numbers in python | solution | program'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiITGuTeRRRh3Q_yZLtzy7rKPFL6WSKMYWe9JhUQB_Lt4sXPkZvatKGxHvOElUNMh9jLnp_vXMGFdsAqqn3M8enGlqEz39yax5VzUzBudSmGWSX7PkNL08SqyblFKDaJ6_ukMX2roM8TF4/s72-c/PicsArt_07-04-11.56.45.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-7881373060349410644</id><published>2021-07-08T07:25:00.008+05:30</published><updated>2021-07-08T11:47:35.557+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#even or odd  solution in python  program#"/><category scheme="http://www.blogger.com/atom/ns#" term="#program even or odd"/><category scheme="http://www.blogger.com/atom/ns#" term="even or odd in python"/><title type='text'>even or odd | solution in python | program  </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg26eVz1nwOYI58lAgwHfXQov_LC9yndTagtrL17reWXv4c5_0S-zXX13ore08RCW5t2QMNoD4InUAt5iatJ1AjLyS7TWQrBsf7K3zgx2SLBV4xuDYLOK3ZAk0cLYz9HrSI7lFewLZMGNU/s2048/PicsArt_07-04-11.55.38.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Program to print even or odd.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;An&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;even number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;that can be divided into two equal groups. An&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;odd number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;that cannot be divided into two equal groups.&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;Even numbers&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;end in 2, 4, 6, 8 and 0 regardless of how many digits they have (we know the&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;5,917,624 is&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;even&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;because it ends in a 4!).&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;Odd numbers&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;end in 1, 3, 5, 7, 9.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Input :&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;12&lt;/b&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Output :&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;even&lt;/b&gt;&lt;/div&gt;&lt;h3&gt;PROGRAM TO PRINT EVEN ODD &lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program to print even or odd.
num = int(input(&quot;enter an integer &quot;))
if num % 2 == 0:
    print(&quot;even&quot;)
else:
    print(&quot;odd&quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;enter an integer 23
odd&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/7881373060349410644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/even-or-odd-solution-in-python-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7881373060349410644'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7881373060349410644'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/even-or-odd-solution-in-python-program.html' title='even or odd | solution in python | program  '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg26eVz1nwOYI58lAgwHfXQov_LC9yndTagtrL17reWXv4c5_0S-zXX13ore08RCW5t2QMNoD4InUAt5iatJ1AjLyS7TWQrBsf7K3zgx2SLBV4xuDYLOK3ZAk0cLYz9HrSI7lFewLZMGNU/s72-c/PicsArt_07-04-11.55.38.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-583188447235011997</id><published>2021-07-07T07:43:00.009+05:30</published><updated>2021-07-07T07:43:00.171+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Prime number or not | python | solution"/><category scheme="http://www.blogger.com/atom/ns#" term="prime or composite"/><category scheme="http://www.blogger.com/atom/ns#" term="program to find prime or not"/><title type='text'>Prime number or not | python | solution </title><content type='html'>&lt;h1 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Prime number&lt;/h1&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy2pztfVO5mflz0CTS2AT3_AXtz4TEGMdD-sJ7kIVAftU_CFOQhytq-_xyJiMzS6r8ZYsI3nudsaEYbRVydGQyehvXwDu5RGvIGNcYAcPh8LXsR5U32-ujkXnnyIKu5IZDABweO25_V4/s2048/PicsArt_07-04-11.54.01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;2048&quot; data-original-width=&quot;2048&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy2pztfVO5mflz0CTS2AT3_AXtz4TEGMdD-sJ7kIVAftU_CFOQhytq-_xyJiMzS6r8ZYsI3nudsaEYbRVydGQyehvXwDu5RGvIGNcYAcPh8LXsR5U32-ujkXnnyIKu5IZDABweO25_V4/s320/PicsArt_07-04-11.54.01.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;A&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;prime number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;is a&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;greater than 1 with only two factors – themselves and 1. A&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;prime number&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;cannot be divided by any other&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;numbers&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;without leaving a remainder.&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Input&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;11&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Output&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;prime&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Program to print prime or not&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#program to print even or odd.
num = int(input(&quot;enter an integer &quot;))
if num==1:
    print(&quot;neither prime nor composite&quot;)
for i in range(2,num):
    if num%2==0:
        print(&quot;composite&quot;)
        break
    else:
        print(&quot;prime&quot;)
        break    &lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;&lt;h3&gt;enter an integer 1&lt;/h3&gt;&lt;h3&gt;neither prime nor composite&lt;/h3&gt;&lt;h3&gt;enter an integer 11&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;prime&lt;/h3&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/583188447235011997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/prime-number-or-not-python-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/583188447235011997'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/583188447235011997'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/prime-number-or-not-python-solution.html' title='Prime number or not | python | solution '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy2pztfVO5mflz0CTS2AT3_AXtz4TEGMdD-sJ7kIVAftU_CFOQhytq-_xyJiMzS6r8ZYsI3nudsaEYbRVydGQyehvXwDu5RGvIGNcYAcPh8LXsR5U32-ujkXnnyIKu5IZDABweO25_V4/s72-c/PicsArt_07-04-11.54.01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6308024810784345804</id><published>2021-07-06T07:21:00.036+05:30</published><updated>2021-07-06T07:21:00.180+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Centigrade to Fahrenheit | program in python | solution"/><title type='text'>Centigrade to Fahrenheit | program in python | solution</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHg8qkdgNkPjQQdRUFHO6OJG4C_0Vzjw38xVL2k8Gv-YqQ9chJ465_ui1yIhyphenhyphentiHEo__sOm-T9pPY2rc_lCPoKfw7pB1So9WvTz-WlGIYwf7eUl-xuL3TmoyxBrI4ZHRhFBZrmASQIoZQ/s2048/PicsArt_07-04-11.51.17.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;Program to convert&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;color: #202124;&quot;&gt;Centigrade to Fahrenheit &lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;How do you convert C to F easy?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;If you find yourself needing to quickly&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;convert Celsius to Fahrenheit&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;, here is a simple trick you can use: multiply the temperature in degrees&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;Celsius&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;by 2, and then add 30 to get the (estimated) temperature in degrees&lt;/span&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #202124; font-family: arial, sans-serif; font-size: 16px;&quot;&gt;Fahrenheit&lt;/b&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;background-color: #f7f4e7; font-size: 19.5px; white-space: pre-line;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;T(°F) = T(°C) × 9/5 + 32&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Input :&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Temperature in centigrade 32&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Output :&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Fahrenheit is 89.6&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;PROGRAM IN PYTHON&lt;code&gt; &lt;br /&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;#program Here
centigrade = int(input(&quot;Temperature in centigrade &quot;))
#formula fahrenheit = (1.8*centigrade) + 32
fahrenheit = (1.8*centigrade) + 32
print(&quot;fahrenheit is &quot;,fahrenheit)&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;Temperature in centigrade 32
fahrenheit is 89.6&lt;/code&gt;&lt;/pre&gt;

</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6308024810784345804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/centigrade-to-fahrenheit-program-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6308024810784345804'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6308024810784345804'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/centigrade-to-fahrenheit-program-in.html' title='Centigrade to Fahrenheit | program in python | solution'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHg8qkdgNkPjQQdRUFHO6OJG4C_0Vzjw38xVL2k8Gv-YqQ9chJ465_ui1yIhyphenhyphentiHEo__sOm-T9pPY2rc_lCPoKfw7pB1So9WvTz-WlGIYwf7eUl-xuL3TmoyxBrI4ZHRhFBZrmASQIoZQ/s72-c/PicsArt_07-04-11.51.17.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-6005680747273317270</id><published>2021-07-05T06:40:00.006+05:30</published><updated>2021-07-05T22:43:32.459+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#average sum of marks of 6 subjects  average percentage  sum in python solution"/><category scheme="http://www.blogger.com/atom/ns#" term="#percentage of marks sum of marks program solution in python"/><title type='text'>sum of marks of 6 subjects | average | percentage | sum | python solution</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFG_l58L9FrA2VQ8WBbQ9mcGIZFCFC-6iij9lUG0p3AAgPoifqEpoq3ogzP2AR2YVgMyr9RyA-TRVfeE5YTw8bJ6vuDiNsS_XGifv7SQync8qHw1eyAyAKyzZLo_XfmXc81IhL7mi6Awo/s729/Screenshot_2021-07-04-23-47-45-46_3a637037d35f95c5dbcdcc75e697ce91.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;Program to calculate sum of the marks of six subjects and find average and percentage&lt;/span&gt; &lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Explanation :&lt;/b&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Read&amp;nbsp; Marks obtained in six subjects using int(input())&lt;/span&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Average=sum of the marks obtained / total number of marks&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Percentage = (marks obtained / total)*100&lt;br /&gt;&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;box-sizing: border-box; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 15px;&quot;&gt;&lt;h4 style=&quot;box-sizing: border-box; font-family: &amp;quot;Playfair Display&amp;quot;, serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Sample Input 1:&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;50&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;60&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;65&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;80&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;55&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;85&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 15px;&quot;&gt;&lt;h4 style=&quot;box-sizing: border-box; font-family: &amp;quot;Playfair Display&amp;quot;, serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Sample Output 1:&lt;/span&gt;&lt;/h4&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;average = 65.833333333&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;percentage = 65.8333333&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;sum = 395&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;PROGRAM IN PYTHON &lt;/h3&gt;&lt;pre&gt;&lt;code&gt;sanskrit = int(input(&quot;enter marks &quot;))
python = int(input(&quot;enter marks &quot;))
english = int(input(&quot;enter marks &quot;))
maths = int(input(&quot;enter marks &quot;))
chemistry = int(input(&quot;enter marks &quot;))
physics = int(input(&quot;enter marks &quot;))

total=600
#total marks obtained
marks_obtained = (sanskrit+ python+ english+ maths+ chemistry+ physics)
print(&quot;sum of marks is &quot;,marks_obtained)
#Average 
average = (sanskrit+python+english+maths+chemistry+physics)/6
print(&quot;average is &quot;,average)
# percentage
percent = (marks_obtained / total)*100
print(&quot;percentage is &quot;,percent)&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
enter marks 65
enter marks 65
enter marks 50
enter marks 60
enter marks 60
enter marks 0
sum of marks is  300
average is  50.0
percentage is  50.0&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/6005680747273317270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-marks-of-6-subjects-average.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6005680747273317270'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/6005680747273317270'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-marks-of-6-subjects-average.html' title='sum of marks of 6 subjects | average | percentage | sum | python solution'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFG_l58L9FrA2VQ8WBbQ9mcGIZFCFC-6iij9lUG0p3AAgPoifqEpoq3ogzP2AR2YVgMyr9RyA-TRVfeE5YTw8bJ6vuDiNsS_XGifv7SQync8qHw1eyAyAKyzZLo_XfmXc81IhL7mi6Awo/s72-c/Screenshot_2021-07-04-23-47-45-46_3a637037d35f95c5dbcdcc75e697ce91.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-8682874376433064645</id><published>2021-07-04T06:16:00.005+05:30</published><updated>2021-07-04T18:33:32.985+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="python swapping"/><category scheme="http://www.blogger.com/atom/ns#" term="swapping"/><category scheme="http://www.blogger.com/atom/ns#" term="swapping numbers"/><category scheme="http://www.blogger.com/atom/ns#" term="swapping of two integers in python"/><category scheme="http://www.blogger.com/atom/ns#" term="swapping of two nums"/><title type='text'>Swaping two numbers | program | python solution</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIiOIP4gv9PbAirhS9aSwg64u7DEMiwWOS_TW8U_fl2wB5EuxFC97x3Q9H80IxrjCd2CpgVXSS8bDfUW06KTY44-fJ_T-dLBxpncUT8eXn1cPW6O3f13KsyrRtUyprbB5QNDEVswwAE/s2048/PicsArt_07-04-05.40.17.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3&gt;Program for swapping of two numbers&lt;/h3&gt;&lt;h4&gt;Swapping refers to the exchange of two or more things. &lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;Example:&lt;/h4&gt;&lt;h4&gt;a=5 , b=10&lt;/h4&gt;&lt;h4&gt;After swapping a becomes 10 and b becomes 5.&lt;/h4&gt;&lt;h4&gt;Explanation :&lt;/h4&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h4&gt;Read a and b value.&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;Use any of the below methods and get output &lt;br /&gt;&lt;/h4&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Method1:&lt;/h4&gt;&lt;h4&gt;We have very simple method in python i.e., &lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;a , b&amp;nbsp; =&amp;nbsp; b , a&lt;/h4&gt;&lt;h4&gt;Method2:&lt;/h4&gt;&lt;h4&gt;Using third variable or temporary variable , &lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;a = a + b&amp;nbsp; b = a - b a = a- b&lt;/h4&gt;&lt;h4&gt;Method3:&lt;/h4&gt;&lt;h4&gt;Using Bitwise XOR (^),&amp;nbsp; &lt;br /&gt;&lt;/h4&gt;&lt;h4&gt;a = a ^ b b = a ^ b a = a ^ b&lt;/h4&gt;&lt;h4&gt;Input :&lt;/h4&gt;&lt;h4&gt;a =&amp;nbsp; 5&lt;/h4&gt;&lt;h4&gt;b = 10&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;h4&gt;a = 10&lt;/h4&gt;&lt;h4&gt;b = 5&lt;br /&gt;&lt;/h4&gt;&lt;h3&gt;PROGRAM IN PYTHON&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;#swapping of two numbers
a = 5
b = 10
a , b = b , a
#after swapping
print(&quot;a is&quot;,a,&quot;b is &quot;,b)

#method 2
a = a + b
b = a - b
a = a - b
print(&quot;a is&quot;,a,&quot;b is &quot;,b)

#method 2 --- using xor
a = a ^ b
b = a ^ b
a = a ^ b
print(&quot;a is&quot;,a,&quot;b is &quot;,b)&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
a is 10 b is  5
a is 5 b is  10
a is 10 b is  5&lt;/code&gt;&lt;/pre&gt;

</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/8682874376433064645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/swaping-two-numbers-program-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8682874376433064645'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/8682874376433064645'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/swaping-two-numbers-program-python.html' title='Swaping two numbers | program | python solution'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4iIiOIP4gv9PbAirhS9aSwg64u7DEMiwWOS_TW8U_fl2wB5EuxFC97x3Q9H80IxrjCd2CpgVXSS8bDfUW06KTY44-fJ_T-dLBxpncUT8eXn1cPW6O3f13KsyrRtUyprbB5QNDEVswwAE/s72-c/PicsArt_07-04-05.40.17.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-1078296081601215030</id><published>2021-07-03T06:01:00.028+05:30</published><updated>2021-07-04T18:26:57.035+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="simple intrest"/><category scheme="http://www.blogger.com/atom/ns#" term="Simple intrest  | program | solution in python"/><category scheme="http://www.blogger.com/atom/ns#" term="simple intrest solution in python"/><title type='text'>Simple intrest  | program | solution in python</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6jNEy2HtlO5fmx2AM0RM9MvkxenxTKerHg8Xgkb4m_gNu3vL7_vzwjrnLhDL5n1MW-HtQWVBou1MeDgqS9SMmOmato7CkmbW_yWDt8ff4jAayBBA-d9ZwckLL3L0AtfvfuScZWzhnn24/s2048/PicsArt_07-04-05.37.58.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3&gt;Program to find the simple interest from given principle, rate of interest &amp;amp; time&lt;/h3&gt;&lt;h4&gt;Simple Interest = P x T x R ÷ 100, where P = Principal, R = Rate of Interest and T = Time Period of the Loan/Deposit in years&lt;/h4&gt;&lt;h4&gt;Explanation:&lt;/h4&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h4&gt;Read Principle value.&amp;nbsp;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;Read&amp;nbsp; Rate of Interest.&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;Read Time Period.&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;Substitute the values in the below formula&amp;nbsp;&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;simple interest =&amp;nbsp; P x T x R ÷ 100.&lt;/h4&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt; &lt;/h4&gt;
&lt;h3&gt; SIMPLE INTEREST PROGRAM IN PYTHON&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
principle = float(input(&quot;principle &quot;))
rate = float(input(&quot;rate of interest &quot;))
time = int(input(&quot;time &quot;))
pi = 3.1423
#simple interest formula
simple_interest = (principle*rate*time) / 100
print(&quot;simple interest is &quot;,simple_interest)&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
principle 500.0
rate of interest 5.0
time 2
simple interest is  50.0
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/1078296081601215030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/simple-intrest-program-solution-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/1078296081601215030'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/1078296081601215030'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/simple-intrest-program-solution-in.html' title='Simple intrest  | program | solution in python'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6jNEy2HtlO5fmx2AM0RM9MvkxenxTKerHg8Xgkb4m_gNu3vL7_vzwjrnLhDL5n1MW-HtQWVBou1MeDgqS9SMmOmato7CkmbW_yWDt8ff4jAayBBA-d9ZwckLL3L0AtfvfuScZWzhnn24/s72-c/PicsArt_07-04-05.37.58.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-2911297026913702064</id><published>2021-07-02T05:36:00.005+05:30</published><updated>2021-07-04T17:52:14.136+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="area and circumference of circle | program | python |"/><category scheme="http://www.blogger.com/atom/ns#" term="area of circle in python"/><category scheme="http://www.blogger.com/atom/ns#" term="circumference of circle in python."/><title type='text'>Area and circumference of circle | program | python |</title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYCmEnA3dedRiZf5fljGO1pmB_w9k-eU1sKUSHPEvM_NZYZrhDxYtkDezfCYFNwEnGepD1NIXgltY0zvBSLNWq-k7fC9wQVtWKU6ckPHT4nMWZWwLUWMFpKUMI4_h__x5TwS4-2iZ-jrU/s2048/PicsArt_07-04-05.34.56.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3&gt;Program to find area and circumference of circle using radius&lt;/h3&gt;&lt;h4&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Circumference of circle = 2πr&lt;div style=&quot;font-weight: 400;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Area of circle = πr^2&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/h4&gt;&lt;br /&gt;
&lt;h3&gt;Program to find area and circumference of circle using radius&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
radius = float(input(&quot;enter radius &quot;))
pi = 3.1423
#circumference of circle
circum = 2*pi*radius
print(&quot;circumference of circle &quot;,circum)

#area of circle 
area = pi*radius*radius
print(&quot;area of circle &quot;,area)

#USING INBUILT FUNCTIONS
from math import pi
area1 = pi*radius*radius
circum1 = 2*pi*radius
print(&quot;area is &quot;,area1)
print(&quot;circumference &quot;,circum1)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
enter radius 4
circumference of circle  25.1384
area of circle  50.2768
50.26548245743669
25.132741228718345
&lt;/code&gt;&lt;/pre&gt;

</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/2911297026913702064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-circumference-of-circle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/2911297026913702064'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/2911297026913702064'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/area-and-circumference-of-circle.html' title='Area and circumference of circle | program | python |'/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYCmEnA3dedRiZf5fljGO1pmB_w9k-eU1sKUSHPEvM_NZYZrhDxYtkDezfCYFNwEnGepD1NIXgltY0zvBSLNWq-k7fC9wQVtWKU6ckPHT4nMWZWwLUWMFpKUMI4_h__x5TwS4-2iZ-jrU/s72-c/PicsArt_07-04-05.34.56.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-5221503361505126933</id><published>2021-07-01T15:13:00.022+05:30</published><updated>2021-07-04T18:20:01.801+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="Sum of Two Integers | solution in python in C"/><category scheme="http://www.blogger.com/atom/ns#" term="sum of two numbers in python"/><category scheme="http://www.blogger.com/atom/ns#" term="sum of two nums in python and c"/><title type='text'>Sum of Two Integers | solution in C | solution in python </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinMGrO0TilRlD7HuqK25xQQSze8J6v7B0j0esZqBzcZYE4qLJwOe-RWJ2eFfxYnRzaj-sGK-N73pwb5LU0H7x4RrpyDIkNZR05PVMk4n305LzWoo7JQh2-D2nE5CKe-K2LR0_trWYWxpg/s2048/PicsArt_07-01-02.35.56.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;br /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;white-space: pre-line;&quot;&gt;Program to find sum of given two integer numbers.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;white-space: pre-line;&quot;&gt;Explanation :&lt;/span&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;white-space: pre-line;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;font-size: medium; white-space: pre-line;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Read two integers a and b using int(input())&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;font-size: medium; white-space: pre-line;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Assign C variable to a+b c=a+b&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;li&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span face=&quot;Roboto, sans-serif&quot; style=&quot;color: #4c4c4c; font-size: 19.5px; white-space: pre-line;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;print the value of c. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: border-box; color: #4c4c4c; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 15px;&quot;&gt;&lt;h4 style=&quot;box-sizing: border-box; color: black; font-family: &amp;quot;Playfair Display&amp;quot;, serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Sample Input 1:&lt;/span&gt;&lt;/h4&gt;&lt;pre style=&quot;box-sizing: border-box; color: #212529; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 18px; margin-bottom: 1rem; margin-top: 0px; overflow: auto;&quot;&gt;5&lt;/pre&gt;&lt;pre style=&quot;box-sizing: border-box; color: #212529; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 18px; margin-bottom: 1rem; margin-top: 0px; overflow: auto;&quot;&gt;6&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #4c4c4c; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size: 15px;&quot;&gt;&lt;h4 style=&quot;box-sizing: border-box; color: black; font-family: &amp;quot;Playfair Display&amp;quot;, serif; font-size: 22px; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Sample Output 1:&lt;/span&gt;&lt;/h4&gt;&lt;pre style=&quot;box-sizing: border-box; color: #212529; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 18px; margin-bottom: 1rem; margin-top: 0px; overflow: auto;&quot;&gt;11&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;PROGRAM IN C LANGUAGE&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;PROGRAM IN C LANGUAGE
#include&lt;stdio.h&gt;
int main(){

int num1,num2,sum_of_two;
scanf(&quot;%d %d&quot;,&amp;amp;num1,&amp;amp;num2);
sum_of_two=num1+num2;
printf(&quot;sum of two nums is %d&quot;,sum_of_two);
return 0;
}&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Output :&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;sum of two nums is 11&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;PROGRAM IN PYTHON LANGUAGE&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;
num1=int(input())
num2=int(input())
sum_of_two = num1+num2
print(&quot;sum of two nums is &quot;,sum_of_two)&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;sum of two nums is 11&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/5221503361505126933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-two-integers-solution-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/5221503361505126933'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/5221503361505126933'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/07/sum-of-two-integers-solution-in-c.html' title='Sum of Two Integers | solution in C | solution in python '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinMGrO0TilRlD7HuqK25xQQSze8J6v7B0j0esZqBzcZYE4qLJwOe-RWJ2eFfxYnRzaj-sGK-N73pwb5LU0H7x4RrpyDIkNZR05PVMk4n305LzWoo7JQh2-D2nE5CKe-K2LR0_trWYWxpg/s72-c/PicsArt_07-01-02.35.56.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-7943889152056825217</id><published>2021-06-30T06:12:00.028+05:30</published><updated>2021-06-30T06:12:00.169+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#day 10 hackerrank in python."/><category scheme="http://www.blogger.com/atom/ns#" term="#Day 10: Binary Numbers HackerRank  solution in python"/><title type='text'>Day 10: Binary Numbers | HackerRank | solution in python </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYnzx2Qf450ziTR13TCljerXVIJtxzEtz8WIyzO2Y7umqc71Q0PmlKEeNNvMEC6_O_DFA52YayQLLvTohzIdqiqsR65pSrCG3xunl5fkqYmVaGBp1MsPx1hR0of0qzD5hwRdK7xa89k_g/s2048/PicsArt_06-25-12.45.03.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;
  &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;background-color: white; font-family: inherit; font-size: medium; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: bolder;&quot;&gt;Objective&lt;/span&gt;
&lt;/p&gt;
&lt;div class=&quot;challenge_problem_statement&quot; style=&quot;background-color: white; border: 0px none; color: #0e141e; font-family: OpenSans, Arial, Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;div class=&quot;msB challenge_problem_statement_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;font-size: medium;&quot;&gt;Today, we&#39;re working with binary numbers.&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Task&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;Given a base-&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 1001 936.9&quot; width=&quot;2.325ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;integer,&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-2-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;, convert it to binary (base-&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-3-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;). Then find and print the base-&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-4-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 1001 936.9&quot; width=&quot;2.325ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;integer denoting the maximum number of consecutive&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-5-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&#39;s in&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-6-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&#39;s binary representation. When working with different bases, it is
          common to show the base as a subscript.&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Example&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-7-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 3436.1 936.9&quot; width=&quot;7.981ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(878,0)&quot;&gt;
                  &lt;path d=&quot;M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
                &lt;g transform=&quot;translate(1934,0)&quot;&gt;
                  &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                  &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                  &lt;path d=&quot;M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1001,0)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;font-size: medium;&quot;&gt;The binary representation of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-8-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 2309.3 1080.4&quot; width=&quot;5.364ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1001,0)&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(1501,-150)&quot;&gt;
                  &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                  &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(353,0) scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-9-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 3957.4 1080.4&quot; width=&quot;9.191ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1001,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1501,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(2002,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(2502,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(3003,0)&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(3503,-150)&quot;&gt;
                  &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;. In base&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-10-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 1001 936.9&quot; width=&quot;2.325ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;, there are&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-11-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-12-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;consecutive ones in two groups. Print the maximum,&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-13-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;challenge_input_format&quot; style=&quot;background-color: white; border: 0px none; color: #0e141e; font-family: OpenSans, Arial, Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;div class=&quot;msB challenge_input_format_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Input Format&lt;/span&gt;
    &lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;msB challenge_input_format_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;font-size: medium;&quot;&gt;A single integer,&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;challenge_output_format&quot; style=&quot;background-color: white; border: 0px none; color: #0e141e; font-family: OpenSans, Arial, Helvetica, sans-serif; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;div class=&quot;msB challenge_output_format_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Output Format&lt;/span&gt;
    &lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;msB challenge_output_format_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;font-size: medium;&quot;&gt;Print a single base-&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 1001 936.9&quot; width=&quot;2.325ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;integer that denotes the maximum number of
          consecutive&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-2-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&#39;s in the binary representation of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-3-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Input 1&lt;/span&gt;
      &lt;/p&gt;
      &lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--color-bg); background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;5
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Output 1&lt;/span&gt;
      &lt;/p&gt;
      &lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--color-bg); background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;1
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Input 2&lt;/span&gt;
      &lt;/p&gt;
      &lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--color-bg); background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;13
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Output 2&lt;/span&gt;
      &lt;/p&gt;
      &lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: var(--color-bg); background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;2
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;challenge_explanation&quot; style=&quot;background-color: white; border: 0px none; color: #0e141e; font-family: OpenSans, Arial, Helvetica, sans-serif; font-size: 16px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
  &lt;div class=&quot;msB challenge_explanation_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Explanation&lt;/span&gt;
    &lt;/p&gt;
  &lt;/div&gt;
  &lt;div class=&quot;msB challenge_explanation_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Case 1:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;The binary representation of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 1308.3 1080.4&quot; width=&quot;3.039ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M164 157Q164 133 148 117T109 101H102Q148 22 224 22Q294 22 326 82Q345 115 345 210Q345 313 318 349Q292 382 260 382H254Q176 382 136 314Q132 307 129 306T114 304Q97 304 95 310Q93 314 93 485V614Q93 664 98 664Q100 666 102 666Q103 666 123 658T178 642T253 634Q324 634 389 662Q397 666 402 666Q410 666 410 648V635Q328 538 205 538Q174 538 149 544L139 546V374Q158 388 169 396T205 412T256 420Q337 420 393 355T449 201Q449 109 385 44T229 -22Q148 -22 99 32T50 154Q50 178 61 192T84 210T107 214Q132 214 148 197T164 157Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(500,-150)&quot;&gt;
                  &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                  &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(353,0) scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-2-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 1955.4 1080.4&quot; width=&quot;4.542ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1001,0)&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(1501,-150)&quot;&gt;
                  &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;, so the maximum number of consecutive&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-3-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&#39;s is&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-4-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;span style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Case 2:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;The binary representation of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-5-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 1808.8 1080.4&quot; width=&quot;4.201ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M127 463Q100 463 85 480T69 524Q69 579 117 622T233 665Q268 665 277 664Q351 652 390 611T430 522Q430 470 396 421T302 350L299 348Q299 347 308 345T337 336T375 315Q457 262 457 175Q457 96 395 37T238 -22Q158 -22 100 21T42 130Q42 158 60 175T105 193Q133 193 151 175T169 130Q169 119 166 110T159 94T148 82T136 74T126 70T118 67L114 66Q165 21 238 21Q293 21 321 74Q338 107 338 175V195Q338 290 274 322Q259 328 213 329L171 330L168 332Q166 335 166 348Q166 366 174 366Q202 366 232 371Q266 376 294 413T322 525V533Q322 590 287 612Q265 626 240 626Q208 626 181 615T143 592T132 580H135Q138 579 143 578T153 573T165 566T175 555T183 540T186 520Q186 498 172 481T127 463Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(1001,-150)&quot;&gt;
                  &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                  &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(353,0) scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;is&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-6-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.509ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.671ex;&quot; viewbox=&quot;0 -791.3 2455.9 1080.4&quot; width=&quot;5.704ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1001,0)&quot;&gt;&lt;/path&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(1501,0)&quot;&gt;&lt;/path&gt;
                &lt;g transform=&quot;translate(2002,-150)&quot;&gt;
                  &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;scale(0.707)&quot;&gt;&lt;/path&gt;
                &lt;/g&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;, so the maximum number of consecutive&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-7-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&#39;s is&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-8-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;
              &lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;
                &lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;
              &lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;
      &lt;/p&gt;
      &lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-size: 14px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
        &lt;br /&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;#PROGRAM IN PYTHON
import math
import os
import random
import re
import sys

if __name__ == &#39;__main__&#39;:
    n = int(input().strip())
    maxi=0
    current=0
    while(n&amp;gt;0):
        
        if n%2==1:
            current+=1
            if current &amp;gt; maxi:
                maxi=current
        
            
        else:
            current=0
        n//=2
print(maxi)&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/7943889152056825217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/06/day-10-binary-numbers-hackerrank.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7943889152056825217'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/7943889152056825217'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/06/day-10-binary-numbers-hackerrank.html' title='Day 10: Binary Numbers | HackerRank | solution in python '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYnzx2Qf450ziTR13TCljerXVIJtxzEtz8WIyzO2Y7umqc71Q0PmlKEeNNvMEC6_O_DFA52YayQLLvTohzIdqiqsR65pSrCG3xunl5fkqYmVaGBp1MsPx1hR0of0qzD5hwRdK7xa89k_g/s72-c/PicsArt_06-25-12.45.03.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7011452505497426510.post-2310751849069629617</id><published>2021-06-29T09:06:00.048+05:30</published><updated>2021-07-05T02:19:50.474+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="#day 9 hackerrank solution in python3."/><category scheme="http://www.blogger.com/atom/ns#" term="#Day 9: Recursion 3  HackerRank  solution in python"/><title type='text'>Day 9: Recursion 3 | HackerRank | solution in python </title><content type='html'>&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4EC65asDlFIrGOAmLVdaad59sxzd6UiXQBgtXKEJE7u5StKcFLBDKIpCiKqSEFL5HMkoFVZA6CDGaGtmv2UP74342EdQbtvkhhgL7GdpMkJcSl2DGtPNG9s0DWT2oi89s-M4F339zvU/s2048/PicsArt_06-25-12.43.22.jpg&quot; style=&quot;display: none;&quot; /&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Objective&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Today, we are learning about an algorithmic concept called&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;recursion&lt;/span&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Function Description&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;Complete the&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;factorial&lt;/span&gt;&amp;nbsp;function in the editor below. Be sure to use recursion.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;factorial&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;has the following paramter:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 0px 20px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 2; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;int n:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;an integer&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Returns&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 0px 20px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 2; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;int:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;the factorial of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-2-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;&lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Note:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;If you fail to use recursion or fail to name your recursive function&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;factorial&lt;/span&gt;&amp;nbsp;or&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Factorial&lt;/span&gt;,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;you will get a score of&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-3-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.176ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -791.3 500.5 936.9&quot; width=&quot;1.162ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;&lt;path d=&quot;M96 585Q152 666 249 666Q297 666 345 640T423 548Q460 465 460 320Q460 165 417 83Q397 41 362 16T301 -15T250 -22Q224 -22 198 -16T137 16T82 83Q39 165 39 320Q39 494 96 585ZM321 597Q291 629 250 629Q208 629 178 597Q153 571 145 525T137 333Q137 175 145 125T181 46Q209 16 250 16Q290 16 318 46Q347 76 354 130T362 333Q362 478 354 524T321 597Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;challenge_input_format&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;msB challenge_input_format_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Input Format&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;msB challenge_input_format_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;A single integer,&amp;nbsp;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;1.676ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.338ex;&quot; viewbox=&quot;0 -576.1 600.5 721.6&quot; width=&quot;1.395ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;&lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&amp;nbsp;(the argument to pass to&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;factorial&lt;/span&gt;).&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;challenge_constraints&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;msB challenge_constraints_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Constraints&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;msB challenge_constraints_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;ul style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 0px 20px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 2; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;MathJax_SVG&quot; id=&quot;MathJax-Element-1-Frame&quot; style=&quot;border: 0px none; direction: ltr; display: inline-block; float: none; font-family: inherit; font-size: medium; font-stretch: inherit; font-variant: inherit; line-height: normal; margin: 0px; max-height: none; max-width: none; min-height: 0px; min-width: 0px; outline: currentcolor none 0px; overflow-wrap: normal; padding: 0px; vertical-align: baseline; white-space: nowrap; word-spacing: normal;&quot;&gt;&lt;svg focusable=&quot;false&quot; height=&quot;2.343ex&quot; role=&quot;img&quot; style=&quot;vertical-align: -0.505ex;&quot; viewbox=&quot;0 -791.3 4770.1 1008.6&quot; width=&quot;11.079ex&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot;&gt;&lt;g fill=&quot;currentColor&quot; stroke-width=&quot;0&quot; stroke=&quot;currentColor&quot; transform=&quot;matrix(1 0 0 -1 0 0)&quot;&gt;&lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;g transform=&quot;translate(778,0)&quot;&gt;&lt;path d=&quot;M674 636Q682 636 688 630T694 615T687 601Q686 600 417 472L151 346L399 228Q687 92 691 87Q694 81 694 76Q694 58 676 56H670L382 192Q92 329 90 331Q83 336 83 348Q84 359 96 365Q104 369 382 500T665 634Q669 636 674 636ZM84 -118Q84 -108 99 -98H678Q694 -104 694 -118Q694 -130 679 -138H98Q84 -131 84 -118Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g transform=&quot;translate(1834,0)&quot;&gt;&lt;path d=&quot;M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g transform=&quot;translate(2712,0)&quot;&gt;&lt;path d=&quot;M674 636Q682 636 688 630T694 615T687 601Q686 600 417 472L151 346L399 228Q687 92 691 87Q694 81 694 76Q694 58 676 56H670L382 192Q92 329 90 331Q83 336 83 348Q84 359 96 365Q104 369 382 500T665 634Q669 636 674 636ZM84 -118Q84 -108 99 -98H678Q694 -104 694 -118Q694 -130 679 -138H98Q84 -131 84 -118Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g transform=&quot;translate(3769,0)&quot;&gt;&lt;path d=&quot;M213 578L200 573Q186 568 160 563T102 556H83V602H102Q149 604 189 617T245 641T273 663Q275 666 285 666Q294 666 302 660V361L303 61Q310 54 315 52T339 48T401 46H427V0H416Q395 3 257 3Q121 3 100 0H88V46H114Q136 46 152 46T177 47T193 50T201 52T207 57T213 61V578Z&quot; stroke-width=&quot;1&quot;&gt;&lt;/path&gt;&lt;path d=&quot;M109 429Q82 429 66 447T50 491Q50 562 103 614T235 666Q326 666 387 610T449 465Q449 422 429 383T381 315T301 241Q265 210 201 149L142 93L218 92Q375 92 385 97Q392 99 409 186V189H449V186Q448 183 436 95T421 3V0H50V19V31Q50 38 56 46T86 81Q115 113 136 137Q145 147 170 174T204 211T233 244T261 278T284 308T305 340T320 369T333 401T340 431T343 464Q343 527 309 573T212 619Q179 619 154 602T119 569T109 550Q109 549 114 549Q132 549 151 535T170 489Q170 464 154 447T109 429Z&quot; stroke-width=&quot;1&quot; transform=&quot;translate(500,0)&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: 2; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Your submission must contain a recursive function named&amp;nbsp;&lt;span style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;factorial&lt;/span&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;challenge_sample_input&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;msB challenge_sample_input_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Input&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;msB challenge_sample_input_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;3
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;challenge_sample_output&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;msB challenge_sample_output_title&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;p style=&quot;border: 0px none; color: var(--color-text-dark-faded); font-family: var(--font-family-text); font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 2; margin: 5px 0px 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span color=&quot;var(--color-text-dark)&quot; style=&quot;border: 0px none; font-family: inherit; font-size: medium; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: bolder; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Sample Output&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;msB challenge_sample_output_body&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 10px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div class=&quot;hackdown-content&quot; style=&quot;border: 0px none; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: medium none; color: var(--color-text-dark); font-family: var(--font-family-input); font-size: 14px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: 20px; margin-bottom: 0px; margin-top: 12px; outline: currentcolor none 0px; overflow-x: auto; padding: 20px; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border: 0px none; color: var(--color-text-medium-dark); font-family: var(--font-family-input); font-size: 1em; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: currentcolor none 0px; overflow-x: auto; padding: 0px; vertical-align: baseline; word-spacing: -2px;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;6&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;code&gt;#PROGRAM IN PYTHON 
import math
import os
import random
import re
import sys
# Complete the factorial function below.
def factorial(n):
    if n==0 or n==1:
        return 1
    else:
        return n*factorial(n-1) 

if __name__ == &#39;__main__&#39;:
    fptr = open(os.environ[&#39;OUTPUT_PATH&#39;], &#39;w&#39;)

    n = int(input())

    result = factorial(n)

    fptr.write(str(result) + &#39;\n&#39;)

    fptr.close()&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Input :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;3&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;pre&gt;&lt;code&gt;6&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='https://trymycode8.blogspot.com/feeds/2310751849069629617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://trymycode8.blogspot.com/2021/06/day-9-recursion-3-hackerrank-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/2310751849069629617'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/7011452505497426510/posts/default/2310751849069629617'/><link rel='alternate' type='text/html' href='https://trymycode8.blogspot.com/2021/06/day-9-recursion-3-hackerrank-solution.html' title='Day 9: Recursion 3 | HackerRank | solution in python '/><author><name>TryMyCode</name><uri>http://www.blogger.com/profile/15062086548838538619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3jL4i0xUvE7bxRbZUV3IE8rMQ0HTwXFxkKLijKREH_4nJLfRwizNl3kdvS_IqywwIG6CC3nctSvQxCtSeC8598KnKo4Q6xJDhq42yoP0VMYMHAdLaDAbxHM_aJnC4k8g/s113/PicsArt_07-01-04.52.21.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4EC65asDlFIrGOAmLVdaad59sxzd6UiXQBgtXKEJE7u5StKcFLBDKIpCiKqSEFL5HMkoFVZA6CDGaGtmv2UP74342EdQbtvkhhgL7GdpMkJcSl2DGtPNG9s0DWT2oi89s-M4F339zvU/s72-c/PicsArt_06-25-12.43.22.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>