المشاريع البرمجية

سلام عليكم و رحمت الله وبركاته

انشأت هذا الموضوع لي نضع هنا المشاريعنا البرمجية بشكل مرتب من اول مشاريع لغة بايثون

أولًا: بايثون

المستوى الأول :

الوحدى الأولى:

مشروع التخرج من الوحدى:

المشروع الأول : :sparkles: مولد أسماء قنوات يوتيوب :sparkles:

فتح المشروع
name_user = input("Welcome to the YouTube Channel Name Generator \nWhat is your nickname? \n")
channel_user = input("What is your channel about? \n")
print("You could name your channel ( " + channel_user + " with " + name_user + " )")

وحدى الثانية:

المشروع الأول : :sparkles: جمع رقم مكون من خانتين من إدخال المستخدم :sparkles:

فتح المشروع
user_enter = input("Please enter two digits :\n")
user_enter1 = int(user_enter[0])
user_enter2 = int(user_enter[1])
print(user_enter1 + user_enter2)

المشروع الثاني : :sparkles: حساب المساحة :sparkles:

فتح المشروع
str_length = input("Please type Length: \n")
str_width = input("Please type width: \n")
# تحويل النوع من نص إلى رقم عشري
length = float(str_length)
width = float(str_width)
# حساب المساحة الكلية عن طريق الضرب
area = length * width
str_area = str(area)
print("The total area is: " + str_area)

المشروع الثالث : :sparkles: حساب الصنايعي :sparkles:

فتح المشروع
str_length = input("Please type Length: \n")
str_width = input("Please type width: \n")
str_price = input("How much for 1 meter? : \n")
# تحويل النوع من نص إلى رقم عشري
length = float(str_length)
width = float(str_width)
price = float(str_price)
# حساب المساحة الكلية عن طريق الضرب
area = length * width
total_price = area * price
str_area = str(area)
str_total_price = str(total_price)
print("The total area is: " + str_area)
print("Give the guy : £" + str_total_price)

المشروع الرابع : :sparkles: حساب عدد الساعات و عدد الدقائق :sparkles:

فتح المشروع
str_total_minutes = input("Please type the number of minutes: \n")
int_minutes = int(total_minutes)
hours = int_minutes // 60
minutes = int_minutes % 60
print("This course is: " + str(hours) + " hours and " + str(minutes) + " minutes long")

المشروع الخامس : :sparkles: حساب عدد الساعات و عدد الدقائق و عدد الثواني :sparkles:

فتح المشروع
str_total_seconds = input("Please type the number of Seconds: \n")
int_seconds = int(total_seconds)
hours = int_seconds // 3600
minutes = int_seconds // 60 % 60
seconds = int_seconds % 60
print("This course is: " + str(hours) + " hours and " + str(minutes) + " minutes long and " + str(seconds) + " Seconds")

المشروع السادس : :sparkles: معرفة عمر المستخدم :sparkles:

فتح المشروع
user_year = input("How old are you? \n")
print("You were born in the year " + str(2025 - int(user_year)) )

مشروع التخرج من الوحدى:
المشروع الخامس : :sparkles: حساب عدد الساعات و عدد الدقائق و عدد الثواني ( إختصار في الكود ) :sparkles:

فتح المشروع
str_total_seconds = input("Please type the number of Seconds: \n")
int_seconds = int(str_total_seconds)
print(f"This course is: {int_seconds // 3600} hours and {int_seconds // 60 % 60} minutes long and {int_seconds % 60} Seconds")

الوحدى الثالثة:

المشروع الأول : :sparkles: تحقيق من عمر المستخدم لي استخدام التطبيق :sparkles:

فتح المشروع
age = int(input("Welcome to my application \nHow old are you? \n"))
if age < 12:
    print("Sorry, you can't use the app")
else:
    print("Good. You can use the app")

المشروع الثاني : :sparkles: برنامج لي قياس درجات الطلاب :sparkles:

فتح المشروع
score = float(input("Enter your test score: "))
if score >= 90:
    print("You got an A grade!")
elif score >= 75:
    print("You got an B grade!")
elif score >= 50:
    print("You got an C grade!")
else:
    print("You got an F grade!")

مشروع تخرج من الوحدى:
المشروع الرابع : :sparkles: لعبة جزيرة الألغاز ( أول لعبة نصية ):sparkles:

فتح المشروع
print("""
──────────────────────────────
──────▄█───▄███████▄──▐█▄─────
────────▀─██─█████─██─▀───────
──────────██──███──██─────────
────────▄──▀███████▀──▄───────
──────▀█────▀▀─▀─▀▀────█▀─────
──────────────────────────────""")

User_Chose = input("Welcome to my island! \nThere are two doors in front of you. 🚪🔴 a red door and 🚪🔵 a blue door \nWhich door do you want to open? ").lower()
if User_Chose == "red":
   User_Chose2 = input("Great! now you entered a room. \nYou found three boxes: 🎁⚪ white, 🎁⚫ black, 🎁🟢 green \nWhich box do you open? ").upper()
   if User_Chose2 == "GREEN":
      print("Congratulation! You found the treasure! 💰💰💰💰💸💸💸💶💶💶💵💵💵💰💰💰💰💰💰💰💰🤑🤑🤑🤑🤑🤑🤑")
      print("Game over")
   elif User_Chose2 == "WHITE":
      print("Sorry, You opened a box full of snakes.")
      print("Game over🐍🐍🐍🐍🐍🐍🐍🐍")
   elif User_Chose2 == "BLACK":
      print("Sorry, You opened a box full of spiders.")
      print("Game over 🕷️ 🕸️ 🕷️ 🕸️ 🕷️ 🕸️ 🕷️ 🕸️ 🕷️ 🕸️ 🕷️ 🕸️")
   else:
      print(f"You wrote {User_Chose2} , it is not on my list. Retry")
elif User_Chose == "blue":
   print("Sorry, You opened a door full of crocodiles.")
   print("Game over🐊🐸🐸🐊🐸🐸🐊🐸🐸🐊🐸🐸")
else:
   print(f'You wrote {User_Chose} , it is not on my list. Retry')

الوحدى الرابعة:

المشروع الأول : :sparkles: تخمين رقم السري :sparkles:

فتح المشروع
import random
number = input("Enter a-digit PIN code: ")
random_computer = random.randint(1000,9999)
if len(str(number)) != 4:
    print("Please enter 4 digits")
else: 
    if number == random_computer:
      print("Success! PIN code matched")
    elif number != random_computer:
      print("Failure! PIN code did not match")
      print(f"The computer generatedthis PIN: {random_computer}")
5 إعجابات

جيد جدا عمل رائع تستاهل التصفيق :clap: :clap: :clap:

4 إعجابات

الله يبارك فيك
\\\

4 إعجابات

رائع جدا ما شاء الله

4 إعجابات
الحل

سيُخفى هذا الخ

إعجابَين (2)

الله يبارك فيك حبيبي

4 إعجابات