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>O a.<br>if text [char] >= = "0" and ochar <= "9"="" :="" if="" text[count]=""><= "0"="" and="" text[count]=""><= "9"="" :="" o="" c.="" 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? O a. if text [char] >= "0" and text [char] <= "9"="" :="" o="" b.="" if="" char="">= "0" and ochar <= "9"="" :="" if="" text[count]=""><= "0"="" and="" text[count]=""><= "9"="" :="" o="" c.="" o="" d.="" if="" text="">= "0" and char <=>

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here