1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GaryK [48]
3 years ago
4

7.4.8 keeping count: Codehs I don’t understand this one. Could someone help?

Computers and Technology
2 answers:
viktelen [127]3 years ago
3 0

The program is an illustration of loops.

Loops are used to perform repetitive operations.

The keeping count program in Python, where comments are used to explain each line is as follows:

#This defines the function

def count_occurrences(e, d):

#This initializes count to 0

    count = 0

#This iterates through the characters of e

    for checker in e:

#If the current character equals character d

         if (checker == d):

#The counter is incremented y 1

              count = 1

#This returns the counter to main

    return count

   

Read more about similar programs at:

brainly.com/question/20565167

Arada [10]3 years ago
3 0

Answer:

def count_occurrences(e, d):

   count = 0

   for checker in e:

       if (checker == 4):

           counter = 1

   return counter

   

print count_occurrences("elephant","e")

Explanation:

It'ss the one I got so far. Hope! you can fix it .

You might be interested in
Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O
brilliants [131]

Answer:

if(a < 10)

{ b = 0; c = 1;}

else

{ b = -99; c = 0;}

Explanation:

4 0
3 years ago
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional
kumpel [21]

Explanation:

hope this help here is the answer

3 0
4 years ago
How to write cube of a number from flowchart ​
AlekseyPX

Answer:

This is the process to write flowchart .

Help it is helpful.

4 0
3 years ago
Match the parts of the website address with its correct explanation. http://www.usa.gov/Agencies/federal.shtml
storchak [24]

HTTP means Hyper Text Transfer Protocol underlying protocol used by the World Wide Web(www).

usa is the server name which is used address in the DNS record

.gov is the Domain names which  are used to identify more then one IP addresses

Agencies/federal.shtml a directory is a collection of file resources also called the resource ID.

6 0
3 years ago
Read 2 more answers
How would you create a tint of a color?
svetlana [45]
D. white with a hue
HOPE THIS HELPS
5 0
3 years ago
Other questions:
  • La inteligencia o unidad lógica de un computador se denomina como??? Software, Hardware CPU o que, ayuda.....
    7·1 answer
  • What term best describes the way the dns name space is organized?
    9·1 answer
  • An application with which you can perform calculations on numbers and work with other data
    8·1 answer
  • Which option describes wearable technology?
    9·1 answer
  • 1. Briefly explain the concept of signature of a function, in a function declaration. What signature components are crucial for
    9·1 answer
  • Declare a typedef struct named jumper_t that will have four parts: character array name that is 16 in length, double array of tr
    12·1 answer
  • Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equal
    9·1 answer
  • Which of the following correctly orders the units of measure from least to greatest?
    7·2 answers
  • Design an Application called Student Course Management create interface called Student Course add an abstract method called ad C
    10·1 answer
  • How am i able to hear a presenter from a radio station through my fm tuner​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!