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
"The ______ of an operational system that supports an organization includes policies, requirements, and conditional statements t
Serggg [28]

Answer:

decision logic

Explanation:. The decision logic of an operational system that supports an organization includes policies, requirements, and conditional statements that govern how the system works. These systems includes the following :

a) Order processing,

b)Pricing

c) Inventory control, and

d) Customer relationship management. And the traditional means of modifying the decision logic of information systems involves heavy interaction between business users and information technology (IT) analysts.

3 0
3 years ago
How will you swap pictures between a Publication page and the scratch area​
tamaranim1 [39]

Answer:

To move a picture from your publication to the scratch area, click and drag a picture off of a publication page. Then drop it into the scratch area in Publisher.

hope it helped you..

4 0
1 year ago
Is Naab a system of an accounting system? A factory operations system? or both? explain your answer
KonstantinChe [14]

Answer:

accounting system

Explanation:

The most common response variable modeled for cropping systems is yield, whether of grain, tuber, or forage biomass yield. This yield is harvested at a single point in time for determinate annual crops, while indeterminate crops and grasslands may be harvested multiple times. Although statistical models may be useful for predicting these biological yields in response to some combination of weather conditions, nutrient levels, irrigation amounts, etc. (e.g., Schlenker and Lobell, 2010, Lobell et al., 2011), they do not predict responses to nonlinearities and threshold effects outside the range of conditions in data used to develop them.

In contrast, dynamic cropping and grassland system models may simulate these biological yields and other responses important to analysts, such as crop water use, nitrogen uptake, nitrate leaching, soil erosion, soil carbon, greenhouse gas emissions, and residual soil nutrients. Dynamic models can also be used to estimate responses in places and for time periods and conditions for which there are no prior experiments. They can be used to simulate experiments and estimate responses that allow users to evaluate economic and environmental tradeoffs among alternative systems. Simulation experiments can predict responses to various climate and soil conditions, genetics, and management factors that are represented in the model. “Hybrid” agricultural system models that combine dynamic crop simulations with appropriate economic models can simulate policy-relevant “treatment effects” in an experimental design of climate impact and adaptation (Antle and Stockle, 2015).

5 0
2 years ago
Samantha is in the beginning stages of OOP program development. What are the five steps she must follow for creating an OOP prog
lora16 [44]

Answer:

1. Classes and objects

2. Inheritance

3. Polymorphism

4. Data hiding/ encapsulation

5. Interfaces.

Explanation:

Classes and objects depict the major component of the OOP (object oriented programming). It explains the object like a ball in a soccer game development.

The inheritance is like the subclass of the object. Data hiding is a stage in oop where the codes or data are hidden from another users.

In the polymorphism stage, the object is given the ability to change to a sub-object, while in the interface stage a function or method signature is defined without implementing it.

3 0
3 years ago
Read 2 more answers
What are the trinity of the computer system
barxatty [35]

Answer:

I think the answers are input, processes, output

6 0
3 years ago
Other questions:
  • Test if a password entered is correct. The secret phrase is Ada Lovelace. Sample Run 1 Enter the Password: Ada Lovelace Sample O
    13·1 answer
  • You want to place a video from the internet to your desktop. what process do you use?
    15·1 answer
  • Is it more beneficial to have many folders or is it better to " nest subfolders? Explain your response
    5·1 answer
  • All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
    13·1 answer
  • Mkdir() is the command in Java to create a new directory.<br> a) True b) False
    10·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • T F Changes to a function parameter always affect the original argument as well.
    15·1 answer
  • Which alignment aligns text to the left and right side margins?
    15·1 answer
  • 75 pts. Conduct online research about 10 of the most famous and dangerous computer viruses that threatened computer networks aro
    13·1 answer
  • A profit of ₹ 1581 is to be divided amongst three partner P,Q and R in ratio 1/3:1/2:1/5.theshareof R will be?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!