<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: عاشق الابداع</title>
    <description>The latest articles on DEV Community by عاشق الابداع (@adelasmar).</description>
    <link>https://dev.to/adelasmar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2282000%2F0f9d8039-7120-4fef-82cf-d3da74256b16.jpg</url>
      <title>DEV Community: عاشق الابداع</title>
      <link>https://dev.to/adelasmar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adelasmar"/>
    <language>en</language>
    <item>
      <title>Guess whose gonna pay</title>
      <dc:creator>عاشق الابداع</dc:creator>
      <pubDate>Thu, 31 Oct 2024 19:01:04 +0000</pubDate>
      <link>https://dev.to/adelasmar/guess-whose-gonna-pay-f80</link>
      <guid>https://dev.to/adelasmar/guess-whose-gonna-pay-f80</guid>
      <description>&lt;p&gt;import random&lt;br&gt;
print("Welcome to 'whose wallet ?'")&lt;br&gt;
name = input("""You will give me a list of names, and I will pick a person to pay&lt;br&gt;
If you're ready, enter the names separated by a comma: \n """)&lt;br&gt;
if name:&lt;br&gt;
    choice = name.split(",")&lt;br&gt;
    which_one = random.randint(0,len(choice)-1)&lt;br&gt;
else:&lt;br&gt;
    print("You should add a list")&lt;br&gt;
print(f"Please ask {choice[which_one]} to take his wallet out, Dinner is on him")&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Guess Heads or Tails between you and the computer</title>
      <dc:creator>عاشق الابداع</dc:creator>
      <pubDate>Sun, 27 Oct 2024 20:03:22 +0000</pubDate>
      <link>https://dev.to/adelasmar/guess-heads-or-tails-between-you-and-the-computer-jme</link>
      <guid>https://dev.to/adelasmar/guess-heads-or-tails-between-you-and-the-computer-jme</guid>
      <description>&lt;p&gt;import random&lt;br&gt;
print("Welcome to the Coin Guessing Game!")&lt;br&gt;
print ("Choose a method to toss the coin: \n 1. Using random.random() \n 2. Using random.randint()")&lt;br&gt;
choice = input("Enter your choice (1 or 2): \n ")&lt;br&gt;
guess = input("Enter your Guess (Heads or Tails): \n ").lower()&lt;br&gt;
if guess not in ["tails", "heads"]:&lt;br&gt;
    print("Invalid choice. Please select either Heads or Tails")&lt;br&gt;
else:&lt;br&gt;
    if choice == "1":&lt;br&gt;
       res = "heads" if random.randint(0,1) ==1 else "tails"&lt;br&gt;
       if res == guess:&lt;br&gt;
          print("Congratulations! You won!")&lt;br&gt;
          print(f"The computer's coin toss result was: {res}")&lt;br&gt;
       elif res != guess:&lt;br&gt;
            print("Sorry, You lost!")&lt;br&gt;
            print(f"The computer's coin toss result was: {res}")&lt;br&gt;
    elif choice == "2":&lt;br&gt;
       res = "heads" if random.random() &amp;gt;=0.5 else "tails"&lt;br&gt;
       if res == guess:&lt;br&gt;
          print("Congratulations! You won!")&lt;br&gt;
          print(f"The computer's coin toss result was: {res}")&lt;br&gt;
       elif res != guess:&lt;br&gt;
            print("Sorry, You lost!")&lt;br&gt;
            print(f"The computer's coin toss result was: {res}")&lt;br&gt;
    else:&lt;br&gt;
        print("Invalid choice. Please select either 1 or 2")&lt;/p&gt;

</description>
    </item>
    <item>
      <title>guess a number from 4 digit</title>
      <dc:creator>عاشق الابداع</dc:creator>
      <pubDate>Sat, 26 Oct 2024 18:41:13 +0000</pubDate>
      <link>https://dev.to/adelasmar/guess-a-number-from-4-digit-2gde</link>
      <guid>https://dev.to/adelasmar/guess-a-number-from-4-digit-2gde</guid>
      <description>&lt;p&gt;import random&lt;br&gt;
digit = (input("Enter a 4-digit Pin Code: \n"))&lt;br&gt;
my_random_d = random.randint(1000,9999)&lt;br&gt;
if len(digit) ==4:&lt;br&gt;
    if my_random_d==digit:&lt;br&gt;
        print("Pin Code Matched")&lt;br&gt;
    else:&lt;br&gt;
        print(f"Failure! Pin Code did not match.\n The Computer generated this code: {my_random_d}")&lt;br&gt;
else:&lt;br&gt;
    print("Please Enter 4 digits")&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
    </item>
  </channel>
</rss>
