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
alisha [4.7K]
3 years ago
8

g Write a recursive function all capital (L,start ,stop) that takes a string L and two integers. It returns a Boolean (True/Fals

e). The function will return True if there are ONLY upper case letters in the string from index start to index stop. The function will return False if there are any lower case letters in the string from index start to index stop.
Computers and Technology
1 answer:
Anton [14]3 years ago
8 0

Answer:

def recursive(L, start, stop):

         y = L[start:stop]

         print(y.isupper())

recursive("ALLow", 0, 3)

Explanation:

The code is written in python.

def recursive(L, start, stop):

The function is defined known as recursive. The function takes a string and 2 integers known as start and stop. The parameter L is a string and the other 2 parameter start and stop are integers which indicates the index range of the string L.  

y = L[start:stop]

A variable y is declared to store the string L with the index range from start to stop . Note start and stop are integers.

print(y.isupper())

The code prints True if the index range of the string L are all upper case else it print False.

recursive("ALLow", 0, 3)

This code calls the function with the required parameters L(string), Start(integer) and stop(integer)

 

You might be interested in
Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns two independent sets
Zigmanuir [339]

Answer:

Check the explanation

Explanation:

CREATE PROCEDURE sp_Q1

<u><em>"at"</em></u>country1 NVARCHAR(15),

<u><em>"at"</em></u>country2 NVARCHAR(15)

AS

BEGIN

  BEGIN

      SELECT SupplierID, CompanyName, Phone, Country FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)

     

  SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products

      where SupplierID in(

      SELECT SupplierID FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)) ORDER BY SupplierID

  END

END

GO

-- Testing script.

DECLARE <u><em>"at"</em></u>RC int

DECLARE <u><em>"at"</em></u>country1 nvarchar(15)

DECLARE <u><em>"at"</em></u>country2 nvarchar(15)

-- Set parameter values here.

set <u><em>"at"</em></u>country1='UK'

set <u><em>"at"</em></u>country2='Canada'

EXECUTE <u><em>"at"</em></u>RC = [dbo].[sp_Q1]

<u><em>"at"</em></u>country1

,<u><em>"at"</em></u>country2

GO

Kindly check the attached images below to see how it looks like on a code editor.

7 0
3 years ago
Administrative activities, such as archiving project files, closing out contracts, documenting lessons learned, and receiving fo
asambeis [7]

Answer:

closing

Explanation:

6 0
2 years ago
For the description below, develop an E-R diagram:
xeze [42]

Answer:

See explaination

Explanation:

E-R diagram:

Entity Relationship Diagram, also known as ERD, ER Diagram or ER model, is a type of structural diagram for use in database design. An ERD contains different symbols and connectors that visualize two important information: The major entities within the system scope, and the inter-relationships among these entities.

Please kindly check attachment for for the ERD of the question asked.

4 0
3 years ago
8.2 code practice edhesive?
Illusion [34]

Answer:

temperatures = []

i = 0

while i < 5:

   try:

       t = int(input('Enter a temperature: '))

       temperatures.append(t)

       i += 1

   except ValueError:

       print('Enter a number')

print(temperatures)

Explanation:

Hope this helps!

6 0
3 years ago
4.8% complete this is a single choice question; skip ahead to question content a b c d confirm difficulty level: moderate an int
PilotLPTM [1.2K]

Answer:

A replay attack

4 0
2 years ago
Other questions:
  • You use worksheets to perform calculations. How do you perform these calculations?
    15·2 answers
  • 25. Becca is learning how to brush her teeth independently and her therapist/RBT has created an activity schedule to help teach
    6·1 answer
  • Linguist study
    9·1 answer
  • What is the slide sorter view used for?
    11·1 answer
  • The type of database that is connected by a company's local area networks is a(n:
    11·1 answer
  • Which two tasks are associated with router hardening? (choose two.)?
    6·1 answer
  • What is SoC? how is it different from CPU?
    14·1 answer
  • I am stuck on these 2 questions. Can someone help me please?
    10·1 answer
  • Why is the song Twinkle Twinkle Little Star an example of ternary form?
    10·1 answer
  • A eclipse occurs at a full moon when the moon passes between earth and the sun
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!