Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Saturday at 3:51 PM
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Nov 4, 2026
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
PYTHON
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="nuni" data-source="post: 13922443" data-attributes="member: 168835"><p>Hope this is what you want machang <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p><p></p><p><strong><p style="margin-left: 20px">#Generating a random number between 0 and 20</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>import random</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>m=random.randrange(0,20)</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>#Printing the Random Number</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>print('This is my Random No -', m)</p></strong></p><p style="margin-left: 20px"><strong>Final = 1</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>while (m>0):</p></strong></p><p style="margin-left: 20px"><strong> #print(m)</p></strong></p><p style="margin-left: 20px"><strong> Final = Final * m</p></strong></p><p style="margin-left: 20px"><strong> m -= 1</p></strong></p><p style="margin-left: 20px"><strong></p></strong></p><p style="margin-left: 20px"><strong>print('Final Answer is: ', Final)</p><p></strong></p><p>Beware of indentation <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" />. While loop eke Athule thiyena deka indent karanna <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /> eka tab ekak <img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="nuni, post: 13922443, member: 168835"] Hope this is what you want machang :) [B][INDENT]#Generating a random number between 0 and 20 import random m=random.randrange(0,20) #Printing the Random Number print('This is my Random No -', m) Final = 1 while (m>0): #print(m) Final = Final * m m -= 1 print('Final Answer is: ', Final)[/INDENT][/B] Beware of indentation :). While loop eke Athule thiyena deka indent karanna :) eka tab ekak :) [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom