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
White raven [17]
4 years ago
5

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in

the string.
Ex: If the input is:

n Monday
the output is:

1
Ex: If the input is:

z Today is Monday
the output is:

0
Ex: If the input is:

n It's a sunny day
the output is:

2
Case matters. n is different than N.

Ex: If the input is:

n Nobody
the output is:

0
Your program must define and call the following function that returns the number of times the input character appears in the input string. int CountCharacters(char userChar, string userString)

Computers and Technology
1 answer:
attashe74 [19]4 years ago
5 0

Answer:

Let me see the picture clearly

Explanation:

You might be interested in
Modify this query so results are grouped by values in the DeptName field and values in the Credits field are summarized with the
docker41 [41]

Answer:

Select and group the table with the DeptName and sum the credits field from the Design Ribbon tab, click the Totals button, then click the credits field's total row, expand the Total row's Group by list, and select the Sum option and then click run.

Explanation:

Microsoft Access is a relational database platform developed by Microsoft. It is used to create a database for storing data and a means of querying the data from storage.

The result of the query can be a grouped dataset, grouping a column by the aggregate of another column. The dataset above is queried to return the grouped DeptName by the aggregate of the sum of the credits field.  

7 0
3 years ago
One of the benefits of conditional ____________________ is that it helps you analyze data by highlighting significant trends in
Lelu [443]

Answer is Formatting

When conditional formatting is applied to your data, you can quickly and easily identify variances in different values within a quick glance. This makes worksheets easier to comprehend. With conditional formatting, you are able to apply formatting such as icons, data bars, and colors.

 

 

 






5 0
4 years ago
The two roots of a quadratic equation, for example 2 + + = 0, can be obtained using the following formula: Two Roots: 1 = − + √
Vladimir79 [104]

lst = input("Enter a,b,c: ").split(",")

a = float(lst[0])

b = float(lst[1])

c = float(lst[2])

root1 = (-b + ((b**2-(4*a*c))**0.5))/(2*a)

root2 = (-b - ((b**2-(4*a*c))**0.5))/(2*a)

dis = b**2 - (4*a*c)

if dis > 0:

   print("The roots are {} and {}".format(root1, root2))

elif dis < 0:

   print("The equation has no real roots")

else:

   print("The root is {}".format(root1))

I wrote my code in python 3.8. I hope this helps!

5 0
3 years ago
What are the disadvantages of a Cessna 172?
Brut [27]

Answer:

The 172 accounted for 17-percent of the active fleet and flew 16-percent of the hours flown while accounting for six-percent of the fatal accidents.

Explanation:

In a two-year period there was but one fatal 172 accident that was due to a mechanical failure. That was an engine failure related to a valve. There were no fatal accidents related to fuel exhaustion or starvation.

Despite the good record in that area, the 172 is probably involved in just as many forced landings as any like airplane. It just appears more adaptable to impromptu arrivals than some other airplanes. The low landing speed contributes to this. There is no available statistic on this, but I would bet that most 172 forced landings don’t result in what the NTSB classifies as an accident.

I looked at fatal 172 accidents that occurred during two more recent years (2012 and 2013) when virtually all the NTSB reports were final as opposed to preliminary. There were 25 such accidents in the 48 contiguous states. If the methodology I used years ago is applied to that number, the 172 safety record appears to have improved, maybe substantially.

6 0
3 years ago
Complete the sentence.
Luda [366]
The answer is Tablets
6 0
3 years ago
Other questions:
  • Type of media that uses laser technology to store data and programs is
    6·1 answer
  • What do you think is the biggest threat to the security of your personal information?
    5·2 answers
  • Write an Assembly program in MIPS that does the following:
    7·1 answer
  • Html code to hyperlink home.html​
    5·1 answer
  • For which of the following values of A and B will the expression A || B be true?
    15·1 answer
  • Kareem is working on a project for his manager. He has a few questions for a co-worker who he knows is knowledgeable on the subj
    7·1 answer
  • C. There are two types of computer on the basis of size. true or false​
    5·1 answer
  • You can have more that one image open at a time in GIMP. True or false
    10·1 answer
  • A file named "dogs.txt" exists and has 60 lines of data. You open the file with the following line of code.
    5·1 answer
  • What search operator would you use with the word "Android" to find Android phone, Android smartphone, and Android cell phone?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!