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]
4 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]4 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
(true/false) In a layered operating system design, requests (such user processes may need to interact with multiple layers, resu
Julli [10]

Answer:

The correct answer to this question is "true".

Explanation:

In a layered operating system, all the layers defined individually and communicate with each other when required. It is also easier to create, manage and update the system. If we change in one layer. The Changement has done in only a specific layer it does not affect any other layers. In this operating system, there are 6 layers.

In the monolithic system. It works on the kernel space. That increases the size of the operating system and kernel. It is different than the microkernel system. In the monolithic system, there are 3 layers.

If we assign any work to both, So the 6 layers will take more time to do that work. when that 3 layers take less time to do that work.

that's way layered operating performance is slower than the monolithic system.

6 0
4 years ago
Learning how to use word processing and spreadsheets, and creating presentations are all considered __________ computer skills.
irina [24]

Answer: a i hope it help

Explanation:

4 0
3 years ago
Read 2 more answers
If a user wished to insert a triangle or a callout figure in a document, he or she should select the _____ option.
Vlada [557]
The Insert Tab option

You can add a shape your word, excel or PowerPoint document to make a drawing. To do this in MS Word, click on the Insert tab, and in the illustration group, click on the shapes option. Click the shapes or callouts that you would like to insert and then drag to place the shape anywhere in the document.






4 0
3 years ago
Indonesia is planning to move its capital from Jakarta to the island of Borneo in the hope that the burden of congestion, regula
JulijaS [17]

Answer:

Indonesia's capital has just been relocated from Jakarta to a site within the jungle of Kalimantan on Borneo island after parliament approved the bill. It will strengthen supply chains and place Indonesia "in a more strategic position in world trade routes, investment flows, and technological innovation."

Explanation:

mark as brainiest

6 0
2 years ago
Read 2 more answers
How do you properly turn off a computer?
Ugo [173]

Answer:

with the power button or do the sleep or shut down

and by the type of computer

Explanation:

sry if its wrong

have a good day:)

-XxMissNobodyxX

7 0
2 years ago
Read 2 more answers
Other questions:
  • Power brakes:
    12·2 answers
  • Define decomposition
    9·1 answer
  • Programming assignment (100 pts): In the C++ programming language write a program capable of playing Tic-Tac-Toe against the use
    14·1 answer
  • how does modern information technology has affected society ?? Need help on how it has affected society
    10·1 answer
  • 1. You have just upgraded memory on a computer from 4 GB to 8 GB by adding one DIMM. When you first turn on the PC, the memory c
    13·2 answers
  • Given the following code:
    8·1 answer
  • Question # 2 Multiple Select You wrote a program to compare the portion of drivers who were on the phone. Which statements are t
    15·1 answer
  • Anyone wanna talk im 13 eboy single
    11·2 answers
  • How to find the next instance of text formatted in bold
    15·1 answer
  • Please please help I don’t understand this
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!