<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>Bạn Hoa viết chương trình có nội dung như sau:
A = [2, 6, 10, 0, 1]
for i in range(6):
    print(A[i], end = &quot; &quot;)
Khi Hoa cho chạy chương trình thì chương trình bị dừng lại và hiện thông báo:
2 6 10 0 1 
Traceback (most recent call last):
 Python Shell, prompt 1, line 3
 IndexError: list index out of range
Câu hỏi:
1. Chương trình bạn Hoa viết ở trên có lỗi không? 
2. Theo em, áp dụng phương pháp kiểm thử chương trình nào để phân tích, tìm và sửa lỗi?
3. Đó là mã lỗi gì? Hãy sửa lỗi của chương trình trên. by AN ĐÀO</title>
      <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2024-04-17 06:40:02 UTC</pubDate>
      <lastBuildDate>2024-04-20 01:02:30 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Tổ 3</title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2961955785</link>
         <description><![CDATA[<ol><li><p>Chương trình bạn Hoa có lỗi</p></li><li><p>Phương pháp quan sát lỗi Runtime và bắt lỗi ngoại lệ</p></li><li><p>Đó là mã lỗi Index Error. Sửa số 6 thành số 5</p></li></ol>]]></description>
         <enclosure url="" />
         <pubDate>2024-04-19 13:47:32 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2961955785</guid>
      </item>
      <item>
         <title>Tổ 4</title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2961969286</link>
         <description><![CDATA[<p>1. Có, chương trình có lỗi.</p><p>2 . Phương pháp kiểm thử chương trình  có thể áp dụng là: Quan sát mã lỗi Runtime và bắt lỗi ngoại lệ </p><p>3. Mã lỗi là "IndexError: list index out of range".</p><p>Để sửa lỗi, chương trình có thể được sửa như sau: Thay đổi chỉ số ở câu lệnh " for i in range(6): " thành " for i in range(5): "</p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-04-19 13:58:24 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2961969286</guid>
      </item>
      <item>
         <title>Tổ 1</title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962012484</link>
         <description><![CDATA[<ol><li><p>Có lỗi</p></li><li><p>Áp dụng phương pháp kiểm thử chương trình: quan sát mã lỗi runtime và bắt lỗi ngoại lệ</p></li><li><p>Đó là lỗi indexError. Sửa số 6 thành số 5</p></li></ol>]]></description>
         <enclosure url="" />
         <pubDate>2024-04-19 14:33:15 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962012484</guid>
      </item>
      <item>
         <title>Tổ 2</title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962026957</link>
         <description><![CDATA[]]></description>
         <enclosure url="" />
         <pubDate>2024-04-19 14:45:22 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962026957</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962456864</link>
         <description><![CDATA[<p>Tổ 2</p><p>3.Đó là mã lỗi indexerror </p><p>Sửa lỗi chương trình trên là</p><p>A=[2,6,10,0,1]</p><p>For i in range(5)</p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-04-20 01:00:06 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962456864</guid>
      </item>
      <item>
         <title>tổ 2</title>
         <author></author>
         <link>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962457509</link>
         <description><![CDATA[<p>1) chương trình bạn Hoa viết có lỗi</p><p>2) Áp dụng phương pháp kiểm thử  : Quan sát mã lỗi Runtime và bắt lỗi ngoại lệ</p>]]></description>
         <enclosure url="" />
         <pubDate>2024-04-20 01:01:42 UTC</pubDate>
         <guid>https://padlet.com/daothuyanntt/8pmntm0pe96t9542/wish/2962457509</guid>
      </item>
   </channel>
</rss>
