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
Pure VPN - Up to 27 Months
vgp
Updated:
Yesterday at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
May 30, 2026
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Python Bootcamp 100 Days of Code
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="MihiCherub" data-source="post: 26571878" data-attributes="member: 238676"><p>#Day_04</p><p>Randomization and Python Lists (1hr 21min)</p><p></p><p>last exercise repl.it forked students 39,748</p><p></p><p>Python random Module</p><p><a href="https://www.askpython.com/python-modules/python-random-module-generate-random-numbers-sequences" target="_blank">https://www.askpython.com/python-modules/python-random-module-generate-random-numbers-sequences</a></p><p></p><p>Python Data Structures</p><p><a href="https://docs.python.org/3/tutorial/datastructures.html" target="_blank">https://docs.python.org/3/tutorial/datastructures.html</a></p><p></p><p>Day 04 project</p><p>Rock Paper Scissors Game.. Sample Code</p><p></p><p>[CODE=python]import random</p><p>rock = '''</p><p> _______</p><p>---' ____)</p><p> (_____)</p><p> (_____)</p><p> (____)</p><p>---.__(___)</p><p>'''</p><p></p><p>paper = '''</p><p> _______</p><p>---' ____)____</p><p> ______)</p><p> _______)</p><p> _______)</p><p>---.__________)</p><p>'''</p><p></p><p>scissors = '''</p><p> _______</p><p>---' ____)____</p><p> ______)</p><p> __________)</p><p> (____)</p><p>---.__(___)</p><p>'''</p><p></p><p>gestures = [rock, paper, scissors]</p><p>selection = [0,1,2]</p><p></p><p>human_choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors\n"))</p><p>computer_choice = random.choice(selection)</p><p>#computer_choice = random.randint(0, 2)</p><p></p><p>print(gestures[human_choice])</p><p>print("Computer chose:")</p><p>print(gestures[computer_choice])</p><p></p><p>if human_choice == computer_choice:</p><p> print('Draw')</p><p>elif human_choice == 0 and computer_choice == 2:</p><p> print('You Win')</p><p>elif human_choice == 1 and computer_choice == 0:</p><p> print('You Win')</p><p>elif human_choice == 2 and computer_choice == 1:</p><p> print('You Win')</p><p>else:</p><p> print("You lose")[/CODE]</p><hr /><p>----------------------------------------------------</p><p>#Day_05</p><p>Python Loops (59min)</p><p></p><p><img src="https://i.imgur.com/0XnWu2q.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>last exercise repl.it forked students 39,719</p><p></p><p>Fizzbuzz game sample code..</p><p></p><p>[CODE=python]for number in range(1,101):</p><p> if number % 15 == 0: #smallest common multiplication</p><p> print('FizzBuzz')</p><p> elif number % 5 == 0:</p><p> print('Buzz')</p><p> elif number % 3 == 0:</p><p> print('Fizz')</p><p> else:</p><p> print(number)[/CODE]</p></blockquote><p></p>
[QUOTE="MihiCherub, post: 26571878, member: 238676"] #Day_04 Randomization and Python Lists (1hr 21min) last exercise repl.it forked students 39,748 Python random Module [URL]https://www.askpython.com/python-modules/python-random-module-generate-random-numbers-sequences[/URL] Python Data Structures [URL]https://docs.python.org/3/tutorial/datastructures.html[/URL] Day 04 project Rock Paper Scissors Game.. Sample Code [CODE=python]import random rock = ''' _______ ---' ____) (_____) (_____) (____) ---.__(___) ''' paper = ''' _______ ---' ____)____ ______) _______) _______) ---.__________) ''' scissors = ''' _______ ---' ____)____ ______) __________) (____) ---.__(___) ''' gestures = [rock, paper, scissors] selection = [0,1,2] human_choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors\n")) computer_choice = random.choice(selection) #computer_choice = random.randint(0, 2) print(gestures[human_choice]) print("Computer chose:") print(gestures[computer_choice]) if human_choice == computer_choice: print('Draw') elif human_choice == 0 and computer_choice == 2: print('You Win') elif human_choice == 1 and computer_choice == 0: print('You Win') elif human_choice == 2 and computer_choice == 1: print('You Win') else: print("You lose")[/CODE] [HR][/HR] ---------------------------------------------------- #Day_05 Python Loops (59min) [IMG]https://i.imgur.com/0XnWu2q.jpg[/IMG] last exercise repl.it forked students 39,719 Fizzbuzz game sample code.. [CODE=python]for number in range(1,101): if number % 15 == 0: #smallest common multiplication print('FizzBuzz') elif number % 5 == 0: print('Buzz') elif number % 3 == 0: print('Fizz') else: print(number)[/CODE] [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom