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
You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is
cupoosta [38]

Answer:

Explanation:

The following program is written in Java. It takes 5 inputs of int values for the ages of each member in the group. Then it loops through all of the ages and chooses the youngest age. Finally, it applies that age as a discount to the final price which would be $50, outputting the final discounted price. The output for the test case provided can be seen in the attached picture below in red.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int[] person = new int[5];

       System.out.println("Enter age of individual 1: ");

       person[0] = in.nextInt();

       System.out.println("Enter age of individual 2: ");

       person[1] = in.nextInt();

       System.out.println("Enter age of individual 3: ");

       person[2] = in.nextInt();

       System.out.println("Enter age of individual 4: ");

       person[3] = in.nextInt();

       System.out.println("Enter age of individual 5: ");

       person[4] = in.nextInt();

       int youngest = person[0];

       for (int x = 0; x < person.length; x++) {

           if (person[x] < youngest) {

               youngest = person[x];

           }

       }

       double discount = 1 - (((double)youngest) / 100);

       double output = 50 * discount;

       System.out.println("Total Price: " + output + " the youngest is " + youngest);

   }

}

8 0
2 years ago
Write a program. in QBAsSIC
goblinko [34]

Answer:

The program is as follows:

<em>5 INPUT A,B</em>

<em>6 PROD = A * B</em>

<em>7 PRINT PROD</em>

<em>8 TOTAL = A + B</em>

<em>9 PRINT TOTAL</em>

<em>10 DIFF = A - B</em>

<em>11 PRINT DIFF</em>

<em>12 END</em>

Explanation:

This gets input for the two numbers

<em>5 INPUT A,B</em>

This calculates the product

<em>6 PROD = A * B</em>

This prints the calculated product

<em>7 PRINT PROD</em>

This calculates the sum

<em>8 TOTAL = A + B</em>

This prints the calculated sum

<em>9 PRINT TOTAL</em>

This calculates the difference

<em>10 DIFF = A - B</em>

This prints the calculated difference

<em>11 PRINT DIFF</em>

This ends the program

<em>12 END</em>

5 0
2 years ago
which option of the AutoCorrect tool enables you to add and delete words that do not follow abbreviation rules?
quester [9]

The replace text as you type is an option in the AutoCorrect tool that enables the user to add or delete words that do not follow abbreviation rules. Moreover, this is a convenient way to use especially if you are dealing with long string of words that only needs abbreviation.

3 0
3 years ago
Read 2 more answers
Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
horsena [70]

The process that involves writing down your main ideas, subpoints, and supporting material, then using geometric shapes is mapping.

This includes uses of  arrows to indicate logical relationships.

<h3>What is mapping?</h3>

mapping can be regarded as the prescribed way of assigning an object to each object in one set a particular object.

Learn more about mapping at:

brainly.com/question/25168859

7 0
2 years ago
Which of the following is another name for cinematographers? (Select all that apply). lighting specialists production manager di
JulijaS [17]

Answer:

camera operators

directors of photography

Explanation:

Cinematography is simply the art of taking photos and being in charge of cameras in the process of film-making.

There are alternative names for a cinematographer and they include camera operators and directors of photography

3 0
3 years ago
Other questions:
  • Achieving a degree in computer forensics, information technology, or even information systems can provide a strong foundation in
    11·1 answer
  • A. True
    14·2 answers
  • I'm curious why I would need to know this on a school learning site.
    12·1 answer
  • Spreadsheet software creates a ____, composed of a grid of columns and rows
    5·1 answer
  • Electricity was seen as a mysterious force and began to creat a stir when people called​
    13·1 answer
  • Application software definition word excel powerpoint microsoft
    13·1 answer
  • Which of the following is the best definition of a workplace policy?
    13·1 answer
  • In a systems development life cycle (SDLC) model, the purpose of the _____ is to create a physical model that will satisfy all d
    10·1 answer
  • Why are control components necessary in traditional software and generally not required in object-oriented software?​
    11·1 answer
  • If you're a beginner to data analysis, what is the first thing you should check when you build data queries?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!