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
4vir4ik [10]
3 years ago
10

Write a recursive program that requests an answer to the question "Are we there yet?" using an input statement and terminates if

the user answers 'yes', but executes a recursive call if the user answers anything else (do not use any loops in this program).
Computers and Technology
1 answer:
inna [77]3 years ago
3 0

Answer:

def recursive_func():

   x = input("Are we there yet?")

   if x.casefold() == 'Yes'.casefold():

       return

   else:

       recursive_func()

recursive_func()

Explanation:

We define the required function as recursive_func().

The first line takes user input. The user input is stored in variable x.

The next line compares the user input to a string yes. The function executes the else block if the condition isn't met, that is a recursive call is executed.

IF condition returns the function. The string in variable X is compared to a string 'Yes'. the casefold() is a string function that ignores the upper/lower cases when comparing two strings. (This is important because a string 'yes' is not the same yes a string 'Yes' or 'YES'. Two equal strings means their cases and length should match).

You might be interested in
How do I type over Images (photo posted ​
Ber [7]
Oh a document, I do not believe that you have type on images, but if you were to type a text in a app called PicsArt and saved it and then put it onto the document over the picture it would work.
3 0
2 years ago
Read 2 more answers
The capital letter Wis expressed as U+0057 in which system?
Paul [167]

The capital letter W is expressed as U+0057 in Unicode system

  • The Unicode system is known as a type of coding system which contains worldwide character encoding standard that gives a code to every character and symbol in every language spoken in the world today.

  • It is known as the encoding standard that is used in all languages, It makes sure that an individual can retrieve or combine data with the use of different languages altogether.

Conclusively, we can say that the The capital letter W is expressed as U+0057 in Unicode system

Learn more from:

brainly.com/question/24736173

6 0
2 years ago
Read 2 more answers
One way bloggers decide how to present information is by understanding
PSYCHO15rus [73]

I would say strong use of multimedia.

4 0
3 years ago
Read 2 more answers
Visual-verbal synergy has nothing to do with text, but solely with images used in a design.
Ilia_Sergeevich [38]
I think it is true (A) 
3 0
3 years ago
When Windows deletes the driver package and driver files, in what situation might it not delete driver files used by the device
musickatia [10]

Answer:

when there is no junk

Explanation:

3 0
3 years ago
Other questions:
  • Which of the following information security technology is used for avoiding browser-based hacking?
    11·2 answers
  • Create a text file that contains your expenses for last month in the following categories: • Rent • Gas • Food • Clothing • Car
    13·1 answer
  • What are five features of word 2016 you would use to capture the attention of the target audience? Defend you decisions
    9·1 answer
  • The most popular way for hackers to take over hosts today is ________.
    15·2 answers
  • After you set a pin for a domain account on your laptop, that pin can be used only on your laptop. question 17 options:
    7·1 answer
  • What is the term used for a set of programs that acts as an interface between the applications that are running on a computer an
    13·1 answer
  • Which of the following is NOT an argument used to determine how a shot is fired from an A. object the shot itself being instanti
    12·1 answer
  • Which of the following is a web app?
    5·1 answer
  • Here is a list of storage devices:
    5·1 answer
  • How is data written to a blockchain?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!