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
What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
3 years ago
A cathedral hull allows the boat to do what
Hoochie [10]
It allows power boats to have stability while cruising. The cathedral hull  is like a trimaran in terehat it has one main  and two side hulls stuck together so that has a somewhat square to rectangular shape and therefore exhibits greater stability than a single hulled boat. It became more popular with the advent of fibreglass boats in the 1960's and '70s.
5 0
3 years ago
This question refers to a standard deck of playing cards. If you are unfamiliar with playing cards, there is an explanation in P
Norma-Jean [14]

Answer:

Explanation:

Number of ways to select 10 girls in 35C₁₀

Number of ways to select 10 boys in 35C₁₀

Total Number of ways to select is 35C₁₀ x 35C₁₀

4 0
3 years ago
Read 2 more answers
Hardy doesn't have access to a work template, which is on the network server. What should he do?
Anton [14]

He should go to a desktop computer that is attached to the network server to access it

7 0
3 years ago
Read 2 more answers
What value will be stored in the variable t after each of the following statements
olga55 [171]

Answer:

A) t = true

B) t = false

C) t = false

D) t = true

Explanation:

Part A, here 12 is greater than 1 so the condition is true.That is why "t" will hold "true".Part B, here 0 is not greater than 2 so this condition fails.Therefore "t" will hold "false" in this case.Part C,3*2=6 and we are comparing 5 with 6  Therefore condition fails here.That is why "t" will hold "false".Part D, here  we are comparing 5 with 5 and both are equal.So "t" will hold "true".

7 0
3 years ago
Other questions:
  • Windows uses a graphical user interface (GUI), which means: a user can carry out commands by clicking, dragging, or otherwise ma
    6·1 answer
  • Name three types of data stored on a computer’s hard disk
    11·1 answer
  • You and your friend who lives far away want to fairly and randomly select which of the two of you will travel to the other’s hom
    6·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • Should the use of hacktivists by a country against enemy organizations be considered an act of war? Why or why not? How about th
    8·1 answer
  • Which of the following is a valid HTML reference to a CSS file?
    13·1 answer
  • Web analytical packages can obtain the following information when someone visits a website, except Group of answer choices name
    9·1 answer
  • Define the term visual as used in visual programming
    9·1 answer
  • In Super Mario Bros., you become Mario and your friend is Mario’s younger brother Luigi. Your job is to race through Mushroom Ki
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!