Consider the following code segment. It is supposed to count the number of digits (0 - 9) in a string, text. count =0 for char in text : ag count = count + 1 What line of code should be placed in the...


Consider the following code segment.<br>It is supposed to count the number of digits (0 - 9) in a string, text.<br>count =0<br>for char in text :<br>ag<br>count = count + 1<br>What line of code should be placed in the blank to achieve this goal?<br>a.<br>if text [char] >= = "0" and char <= "9"="" :="" o="" c.="" if="" text="" [count]=""><= "0"="" and="" text[count]=""><= "9"="" :="" o="" d.="" if="" text="">= "0" and char <= "9"="" :="" "/="">
Extracted text: Consider the following code segment. It is supposed to count the number of digits (0 - 9) in a string, text. count =0 for char in text : ag count = count + 1 What line of code should be placed in the blank to achieve this goal? a. if text [char] >= "0" and text[char] <= "9"="" :="" o="" b.="" if="" char="">= "0" and char <= "9"="" :="" o="" c.="" if="" text="" [count]=""><= "0"="" and="" text[count]=""><= "9"="" :="" o="" d.="" if="" text="">= "0" and char <= "9"="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here