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]
4 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]4 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
You want to install an rodc in your windows server 2003 forest, which currently has all windows server 2003 domain controllers.
devlian [24]
Make sure the functional level of the forest functional level is Windows Server 2003 or higher. 
Install at least one Windows 2008 Server as a Writable Domain Controller
Run adprep /rodcprep<span> </span>
8 0
3 years ago
Greyer Corp, manufactures surgical instruments. Systems Medico Inc. enters into a contractual arrangement with Greyer that allow
hammer [34]

Answer: Licensee

Explanation:

Licensee is defined as the person who holds the licence after receiving it. He/she is known as license holder who receives it from the licensor. Licensee has the official right and permit to use a service or good.

According to the question, Greyer Corp. is granting the license to System Medico as a licensor so that they can indulge with them to manufacture and sell surgical tools.

For this agreement ,System Medico is paying a yearly fee in the form of permit (license) to access the services of Greyer Corp along with the agreement in the form of licensee

8 0
3 years ago
Ismael would like to insert a question mark symbol in his document. What steps will he need to follow to do that?
myrzilka [38]

Answer:

Hold down the Shift key while pressing the required key.

6 0
3 years ago
Read 2 more answers
3. Write a program that inputs 4 hexadecimal digits as strings (example 7F), converts the string digits to a long – use strtol(i
never [62]

Answer:

#include <stdio.h>

#include <stdlib.h>

int main()

{

char num1[20],num2[20],num3[20],num4[20];

//Checks where the conversion of string to long stops and is required by strtol

char *ptr;

//Stores the converted number string into long.

long result_num1,result_num2,result_num3,result_num4;

//Prompt to enter all the four hexadecimal numbers.

printf("Enter the first hexadecimal number: ");

scanf("%s",num1);

printf("Enter the second hexadecimal number: ");

scanf("%s",num2);

printf("Enter the third hexadecimal number: ");

scanf("%s",num3);

printf("Enter the fourth hexadecimal number: ");

scanf("%s",num4);

//Converting the hexadecimal numbers into long using strtol() function with base 16 for hexadecimal.

result_num1 = strtol(num1,&ptr,16);

result_num2 = strtol(num2,&ptr,16);

result_num3 = strtol(num3,&ptr,16);

result_num4 = strtol(num4,&ptr,16);

//Casting the long to unsigned chars.

unsigned char numb1 = (unsigned char)result_num1;

unsigned char numb2 = (unsigned char)result_num2;

unsigned char numb3 = (unsigned char)result_num3;

unsigned char numb4 = (unsigned char)result_num4;

//Applying the boolean operation on unsigned chars and storing the resultant value in result.

unsigned char result = ((numb1&numb2)|numb3)^numb4;

//Printing the result in capital hex ("%X" take care of this).

printf("%X",result);

return 0;

}

Code OUTPUT

Enter the first hexadecimal number: 1 Enter the second hexadecimal number:2

Enter the third hexadecimal number: 3 Enter the fourth hexadecimal number: 4 Resultant Value: 7 Process returned o (0×0) execution time : 3.076 s

Press any key to continue

4 0
3 years ago
Is Brainly cheating??
Vanyuwa [196]

Answer: What do you mean?

6 0
3 years ago
Read 2 more answers
Other questions:
  • g Write a program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how m
    11·1 answer
  • "the firewall acts as a proxy for which two types of traffic? (choose two.)"
    14·1 answer
  • WordArt styles allow you to add ____.
    9·1 answer
  • Which equation is correct regarding the measure of ∠MNP? m∠MNP = One-half(x – y) m∠MNP = One-half(x + y) m∠MNP = One-half(z + y)
    15·2 answers
  • What is the correct method to use Dreamweaver to find broken links and orphaned files?
    15·1 answer
  • What happens when you get 3 warnings on this site?
    9·2 answers
  • Helllllllllppppppppppp
    9·1 answer
  • Name two living thing and nonliving thing that interact in an ecosystem
    10·1 answer
  • A for loop is used to replace a ________ while loop
    6·2 answers
  • Computers and their input and output devices require power to work and may have many power cords. What is the safest way to orga
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!