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
Sauron [17]
3 years ago
5

write a function solution that given an integer n returns a string consisting of n lowercase lettersn

Computers and Technology
1 answer:
melomori [17]3 years ago
3 0

Answer:

Following are the method to this question:

def solution(s):#defining a method solution

   x=0#defining variable x that assign value 0

   for i in s:#defining for loop to count string value in number

       if(i.islower()):#defining if block that check input character is in lowercase

           x=x+1#increment the value of x by 1

   return x#return x

s=input("Enter string:")#defining s variable that input string value

print(solution(s))#defining print method to solution method                    

Output:

Enter string:Database is the colloection

22

Explanation:

In the given question some data is missing, that's why we define the answer as follows:

  • In the above code, a solution method is defined, which takes "s" variable as the parameter, and inside the method, an integer variable "x" is defined, that holds a value that is "0".
  • In the next line, for loop is declared, that counts string value without space and inside the loop, if block is defined, that checks only the lowercase character and adds the value in x variable, and returns its value.
  • Outside the method s variable is defined, that inputs the string value from the user end, and use the print method to call it and print its calculated value.
You might be interested in
Arturo is a security professional. He is strengthening the security of an information system. His design ensures that if a field
Cloud [144]

Arturo is attempting to protect the database (data) of an information system (IS).

<h3>What is an information system?</h3>

An information system (IS) can be defined as a set of computer systems, that is typically used to collect, store, and process data, as well as the dissemination of information, knowledge, and the distribution of digital products.

In Cybersecurity, there are two (2) main techniques that can be used to check data when inputted in an information system (IS) and these include:

  • Verification
  • Validation

Data validation is a type of check which is primarily performed by a software program (application) to make sure that the data which is entered into an information system (IS) is allowable and sensible.

This ultimately implies that, any data that is not allowed or sensible are rejected and discarded by the computer system.

In conclusion, we can deduce that Arturo is attempting to protect the database (data) of an information system (IS).

Read more on data here: brainly.com/question/25885448

3 0
2 years ago
Who have a ps4 ?<br> Who have 2k20? <br> Are you good a 2k20 ? <br> Add me on Ps4 eoKyriie
Lena [83]

Answer:

lol i would but i have an Xbox...

Explanation:

4 0
3 years ago
Read 2 more answers
All cells in row 2 through 5 are referred as 2:5 true or false
Simora [160]
<h3>Answer:</h3><h2>TRUE</h2>

Explanation:

BRAINLIEST PLSSSSSSSSSSSSSSSSSSS

8 0
3 years ago
Which ipv6 header field is known as the priority field?
Yuki888 [10]
<span>Traffic Class header field is known as the priority field.</span>
4 0
3 years ago
Read 2 more answers
HELP FAST PLEASE
never [62]

Answer:

I am not sure can you explain a little more

7 0
2 years ago
Read 2 more answers
Other questions:
  • What file formats can you safely use in a video presentation
    14·1 answer
  • To play game, go inside the Grand Theft Auto V folder and right click and runGTAVLauncher as administrator.If you get any missin
    5·1 answer
  • SOMEONE PLZZ HELP ME ASAP!!
    15·2 answers
  • Digital on a smart phone means the camera is actually zooming in on the photo itself not the subject that you are shooting true
    8·1 answer
  • IN C++ PLEASE!!!! Define a function FilterStr() that takes a string parameter and returns "Good" if the character at index 4 in
    7·1 answer
  • Write a program that asks the user for a word. Next, open up the movie reviews.txt file and examine every review one at a time.
    15·1 answer
  • When entering a function or formula in a cell, which is the first character
    15·1 answer
  • PLEASEEEEE HELLPPP IT'S URGENT!!! PLEASEEEEE HELLPPP IT'S URGENT!!!
    5·1 answer
  • The LCD screens are found in​
    14·1 answer
  • Michelle has defined a custom object by creating an object literal. She wants to access the properties of the custom object. Mic
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!