#آموزش _@ARCHLIN
۱۷۰
۱۰:۲۵
میتونیم عنصر دوم از لیست 1 رو چاپ کنیم. حالا چاپ کردن که فقط یه مثاله وگرنه شما وقتی با اندیس به عناصر لیست دسترسی داری میتونی هرکاری که مدنظرته انجام بدی!
#آموزش _@ARCHLIN
۱۹۰
۱۶:۵۲
#آموزش _@ARCHLIN
۱۹۵
۱۷:۵۹
رفقاااا سلااام
این چند روز درگیر یه پروژه ای بودم و خب نشد آموزش ها رو پیش ببریم🫠 فعلا علی الحساب موافقید بابت جبران این وقفه یه سورس بازی ببینیم؟
_@ARCHLIN
_@ARCHLIN
۱۶۲
۱۱:۵۴
choices = ["Rock", "Paper", "Scissors"]
print("Welcome to Rock, Paper, Scissors!")
print("Choose one of the following: Rock, Paper, or Scissors.")
rounds = 3
player_score = 0
computer_score = 0
for round in range(1, rounds + 1):
print(f"\nRound {round}/{rounds}:")
player_choice = input("Enter your choice (Rock, Paper, or Scissors): ").capitalize()
if player_choice not in choices:
print("Invalid choice! Please choose Rock, Paper, or Scissors.")
continue
computer_choice = random.choice(choices)
print(f"Computer chose: {computer_choice}")
if player_choice == computer_choice:
print("It's a tie!")
elif (player_choice == "Rock" and computer_choice == "Scissors") or \
(player_choice == "Scissors" and computer_choice == "Paper") or \
(player_choice == "Paper" and computer_choice == "Rock"):
print(f"You win this round! {player_choice} beats {computer_choice}.")
player_score += 1
else:
print(f"You lose this round! {computer_choice} beats {player_choice}.")
computer_score += 1
print(f"\nFinal Score: You {player_score} - {computer_score} Computer")
if player_score > computer_score:
print("Congratulations! You won the game!")
elif player_score < computer_score:
print("Sorry! You lost the game. Better luck next time!")
else:
print("It's a draw! Well played!") تو این بازی تقریبا تمام چیزایی مهمی که تا حالا گفتیم استفاده شده و مثال خوبیه برای تمرین و یادگیری بیشتر ۱۷۳
۲۰:۲۵

پاکت هدیه
آرچلین💻☕
#آموزش _@ARCHLIN
۱۴۳
۱۶:۵۳
#آموزش _@ARCHLIN
۱۴۲
۱۷:۰۸