Trace table
 11.5.1.4 use trace tables to find and verify the correctness of an algorithm Trace table What can we use to check the correctness of an algorithm?  If we have difficulty finding errors in the program, then we can use the trace table. Definition A trace table is a technique used to test an algorithm and predict step by step how the computer will run the algorithm. It can be used to understand or predict what an algorithm is doing and to identify potential logic errors (when the program compiles but does not produce the expected output). The purpose of a trace table: Trace table is used to find the value of variables at each step in an algorithm / program. It may be used when debugging a program. The manually calculated value at each stage of the program is compared with that actually set in the program. It may be used when designing a program by writing an algorithm. A trace table is useful for designing or debugging a loop structure. Create trace table online Questions: What is trace tables? In which type of test we should use trace table? What type of errors are trace tables used to check?    Exercises: Ex.1 Ex. 2 Check the following algorithms and complete their trace tables. Go to tasks Ex. 3 Exam question: .u-star-rating-13 { list-style:none; margin:0px; padding:0px; width:65px; height:13px; position:relative; background: url('/.s/t/2001/rating13.png') top left repeat-x } .u-star-rating-13 li{ padding:0px; margin:0px; float:left } .u-star-rating-13 li a { display:block;width:13px;height: 13px;line-height:13px;text-decoration:none;text-indent:-9000px;z-index:20;position:absolute;padding: 0px;overflow:hidden } .u-star-rating-13 li a:hover { background: url('/.s/t/2001/rating13.png') left center;z-index:2;left:0px;border:none } .u-star-rating-13 a.u-one-star { left:0px } .u-star-rating-13 a.u-one-star:hover { width:13px } .u-star-rating-13 a.u-two-stars { left:13px } .u-star-rating-13 a.u-two-stars:hover { width:26px } .u-star-rating-13 a.u-three-stars { left:26px } .u-star-rating-13 a.u-three-stars:hover { width:39px } .u-star-rating-13 a.u-four-stars { left:39px } .u-star-rating-13 a.u-four-stars:hover { width:52px } .u-star-rating-13 a.u-five-stars { left:52px } .u-star-rating-13 a.u-five-stars:hover { width:65px } .u-star-rating-13 li.u-current-rating { top:0 !important; left:0 !important;margin:0 !important;padding:0 !important;outline:none;background: url('/.s/t/2001/rating13.png') left bottom;position: absolute;height:13px !important;line-height:13px !important;display:block;text-indent:-9000px;z-index:1 } Категория: Debugging | Добавил: bzfar77 (24.09.2020) Просмотров: 260 | | Рейтинг: 5.0/1
 Всего комментариев: 0