Home
Software testing is a process of evaluating software to detect the differences between given input and expected output. It is a part of software development. Software testing can be done manually or by using automated tools.
Bug Hunting Tapper<h1>Bug Hunting Tapper</h1><p>Tap on the lines with bugs to test your code quality detection skills</p><div><div><p>Software testing is a process of evaluating software to detect the differences between given input and expected output. It is a part of software development. Software testing can be done manually or by using automated tools.</p><p>In this exercise, tap on the lines that contain bugs in the code snippets. See how many you can find!</p></div><div><div>Score: <span>0</span> / <span>0</span></div>Reset All</div><div><div>JavaScript</div><div>Python</div><div>Java</div></div><div><div><pre><code><span>function calculateTotal(items) {</span><span> let total = 0;</span><span> if (items.length == 0) {</span><span> return total;</span><span> }</span><span></span><span> for (let i = 0; i < items.length; i++) {</span><span> const item = items[i];</span><span> total += item.price * item.quantity;</span><span> }</span><span></span><span> total;</span><span>}</span></code></pre></div><div></div></div><div><div><pre><code><span>def divide_numbers(a, b):</span><span> result = a / b</span><span> return result</span><span></span><span>def process_data(data_list):</span><span> results = []</span><span> for item in data_list:</span><span> if item is 0:</span><span> continue</span><span> results.append(divide_numbers(100, item))</span><span></span><span> return result</span></code></pre></div><div></div></div><div><div><pre><code><span>public class UserAccount {</span><span> private String username;</span><span> private int balance;</span><span></span><span> public UserAccount(String username, int initialBalance) {</span><span> this.username = username;</span><span> this.balance = initialBalance;</span><span> }</span><span></span><span> public void deductAmount(int amount) {</span><span> balance -= amount;</span><span> }</span><span></span><span> public String toString() {</span><span> return username &quot; has balance: &quot; + balance;</span><span> }</span><span>}</span></code></pre></div><div></div></div></div><!-- Script for responsive iframe height -->" data-interaction-code="math_eq_pabqwuy4" style="width: 100%; height: 895px; border: none;">