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
Serggg [28]
4 years ago
7

Write a recursive function, len, that accepts a parameter that holds a string value, and returns the number of characters in the

string. The length of the string is: 0 if the string is empy ("") 1 more than the length of the string beyond the first character
Computers and Technology
1 answer:
Ilya [14]4 years ago
3 0

Answer:

following are the method definition to this question:

def len(x): #defining a method

   if(x==""): #defining condition that checks value store nothing

       return 0# return value  

   else: # else block

       return 1+len(x[1:]) #use recursive function and return value

print(len('The collection of table')) #call method and prints its value  

Output:

23

Explanation:

In the above method definition, a "len" method is declared, in which x variable accepts as its parameter, inside the method a condition block is used, which can be explained as follows:

  • In if block, we check the value is equal to null if this condition is true, it will return a value, that is 0.  
  • In this condition is false, it will go to else block in this block, the recursive method is used, which calculates value length and return its value.
You might be interested in
Supplies/material used in iron​
Novay_Z [31]
The raw materials used to produce pig iron in a blast furnace are iron ore, coke, sinter, and limestone. Iron ores are mainly iron oxides and include magnetite, hematite, limonite, and many other rocks. The iron content of these ores ranges from 70% down to 20% or less.
3 0
3 years ago
Who knows songs that are sad,happy,excited, and calm
anzhelika [568]

sad-

you broke me first

can we kiss forever

love the way you lie

happy-

Say Yes

Valerie

Walking on Sunshine

excited-

who let the dogs out

September

calm-

heather

put your records on

lonely

5 0
3 years ago
Explain about third generation of computer​
diamong [38]

Answer:

The period of third generation was from 1965-1971. The computers of third generation used Integrated Circuits (ICs) in place of transistors. ... This development made computers smaller in size, reliable, and efficient. In this generation remote processing, time-sharing, multiprogramming operating system were used.

Explanation:

hope it helps

6 0
3 years ago
Which qualifications are typical for someone working in Marketing Information Management and Research?
Harman [31]

Answer:

• good teamwork skills and knowledge of search engines and social media.

• math skills for calculating prices, good teamwork, and physical stamina.

• a pleasant attitude, critical-thinking skills for designing surveys, and social awareness.

• creativity, persuasiveness, and good social skills when dealing with news media contacts.

Explanation:

Marketing Information Management and Research is a system in an organization whereby skills such as Marketing Information and Research are made use of by marketers to ensure that they come to know who their consumers are , what exactly the consumers want and how they can satisfy the needs and wants of the consumers using a very fast , precise and correct methods.

A person who works in Marketing Information Management and Research must have the following skills:

• good teamwork skills and knowledge of search engines and social media : Accurate knowledge of search engines such as google e.t.c. helps a person working in Marketing Information Management and Research to have access to the latest trends that consumers follow. These trends provides adequate information about the needs of consumers that is required in research.

Good teamwork skills is very important as it makes working in Marketing Information Management and Research very orderly, there is absence of chaos, when working with one another, creative ideas are obtained.

• math skills for calculating prices, good teamwork, and physical stamina : These skills above are very essential because such a person need to have adequate knowledge of the prices of goods and services that they produce. Physical stamina is also and essential skill.

• a pleasant attitude, critical-thinking skills for designing surveys, and social awareness : These qualifications are important because critical thinking helps a such a person to be able to come up with or create a solution using information from the surveys to accurately meet the needs of the consumers.

Having skills in social awareness gives the person working in Marketing Information Management and Research up to date information about what a consumer wants at this particular time or moment.

• creativity, persuasiveness, and good social skills when dealing with news media contacts: These skills are essential because consumers need to see creativity in products and services that they want as it makes them more attractive.

Having good social skills when dealing with news media contacts is also very important.

6 0
3 years ago
Find prime no using Java
bonufazy [111]

Answer:

Um

Explanation:

I don't understand

4 0
3 years ago
Other questions:
  • A touch screen is classified as a special type of scanning device true or false
    15·1 answer
  • Consider the following table used for grading assignments.
    10·1 answer
  • To increase usability, take care to place important content, such as logos, names, CTAs, and major links, ______ of potential sc
    11·1 answer
  • How do you add a section break that would start the new section on the same page?
    12·2 answers
  • ____ is a real-time Internet communications service that notifies users when one or more people are online and then allows them
    10·1 answer
  • A network administrator has configured a router for stateless DHCPv6 operation. However, users report that workstations are not
    13·1 answer
  • you are teaching a class about basic camera functions like power, basic date/time, menu navigation, and how to properly attach a
    9·1 answer
  • 2. Which of the following statements describes a need or problem that can be solved using the technology design process.
    14·1 answer
  • In a mobile app for computer technicians in a large college, an initial trigger event could be ____.
    7·1 answer
  • USE PYTHON TURTLE GRAPHICS
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!