-->

آخر الأخبار

جاري التحميل ...

This is a fun little animation from the "Automate the Boring Stuff" book

-1-
-2-

 This is a fun little animation from the "Automate the Boring Stuff" book





import time, sys

indent = 0  # How many spaces to indent.
indentIncreasing = True  # Whether the indentation is increasing or not.

try:
    while True:  # The main program loop
        print(' ' * indent, end='')
        print('********')
        time.sleep(.2)  # Pause for 1/10 of a second.

        if indentIncreasing:
            # Increase the number of spaces:
            indent = indent + 1
            if indent == 20:
                indentIncreasing = False  # Change direction
        else:
            # Decrease the number of spaces:
            indent = indent - 1
            if indent == 0:
                indentIncreasing = True  # Change direction

except KeyboardInterrupt:
    sys.exit()



Python 3.13.17 (tags/v3.13.17:64e080d, Oct 21 2026, 14:08:53) [MSC v.1944 64 bit (AMD64)] on win32
Enter "help" below or click "Help" above for more information.

======================= RESTART: D:/study py/day001/ئئ.py ======================
********
 ********
  ********
   ********
    ********
     ********
      ********
       ********
        ********
         ********
          ********
           ********
            ********
             ********
              ********
               ********
                ********
                 ********
                  ********
                   ********
                    ********
                   ********
                  ********
                 ********
                ********
               ********
              ********
             ********
            ********
           ********
          ********
         ********
        ********
       ********
      ********
     ********
    ********
   ********
  ********
 ********
********
 ********
  ********
   ********
    ********
     ********
      ********
       ********
        ********
         ********
          ********
           ********
            ********
             ********
              ********
               ********
                ********
                 ********
                  ********
                   ********
                    ********
                   ********
                  ********
                 ********
                ********
               ********
              ********
             ********
            ********
           ********
          ********
         ********
        ********
       ********
      ********
     ********
    ********
   ********
  ********
 ********
********
 ********
  ********
   ********
    ********
     ********
      ********
       ********
        ********
         ********
          ********
           ********
            ********
             ********
              ********
               ********
                ********
                 ********
                  ********
                   ********
                    ********
                   ********
                  ********
                 ********
                ********
               ********
              ********
             ********
            ********
           ********
          ********
         ********
        ********
       ********
      ********
     ********
    ********
   ********
  ********
 ********
********
 ********
  ********
   ********
    ********
     ********
      ********
       ********
        ********
         ********
          ********
           ********
            ********
             ********
              ********
               ********
                ********
                 ********
                  ********
                   ********
                    ********
                   ********
                  ********


-3-
-4-

التعليقات



إذا أعجبك محتوى مدونتنا نتمنى البقاء على تواصل دائم ، فقط قم بإدخال بريدك الإلكتروني للإشتراك في بريد المدونة السريع ليصلك جديد المدونة أولاً بأول ، كما يمكنك إرسال رساله بالضغط على الزر المجاور ...

إتصل بنا

جميع الحقوق محفوظة

مدونة كورس 7

2021