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
When the + operator is used with strings, it is known as the?
Darya [45]
Concatenation, which mean we combine two or more strings into one.
5 0
3 years ago
The first idea for a communications network was called:
malfutka [58]

Answer:

the galactic network.

have a nice day <3

Explanation:

increase power in the telephone industry. investigate technologies for the military in the US. he first idea for a communications network was called: the galactic network.

8 0
2 years ago
When using windows file explorer, which view provides the most information at a glance?
tester [92]

Details view provides the most information at a glance.

<h3>Which view in File Explorer can you use to sort files by column heading?</h3>

In Explorer windows, files and folders appear in lists with headings at the top in Details view. You can use the headings to change how files are displayed in the window. You can use filtering and sorting to display the files and folders you want.

<h3>What is the command to display the list of files in a directory?</h3>

Use the ls command to display the contents of a directory. The ls command writes to standard output the contents of each specified Directory or the name of each specified File, along with any other information you ask for with the flags.

To learn more about Details view, refer

brainly.com/question/24858866

#SPJ4

3 0
2 years ago
Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol
Ksivusya [100]

Answer:

11 bit slot will be needed

Explanation:

The number of prime numbers between 1 through 16

= 2, 3 , 5, 7, 11 and 13

hence we can say 6 stations are to use the shared channel

Given that all the stations are ready simultaneously

The number of bit slots that will be needed to handle the contention will be 11 bits :

slot 1 : 2, 3, 5 , 7, 11 , 13

slot 2 : 2,3, 5, 7

slot 3 : 2, 3

slot 4 : 2 .   slot 5 : 3 .  slot 6 : 5,7.   slot 7 : 5 .   slot 8 : 7.  slot 9: 11,13.  

slot 10 : 11.   slot 11 : 13

8 0
3 years ago
A town government is desinging anew bus system
Kamila [148]

Answer:

Umm what? Are you talking about the type of problem it is? If so it is an optimization problem.

Explanation:

I had something like this for one of my tests and I chose the optimization problem because it finds the values of decision variables that result in a maximum or minimum of a function.

But ion know if it's this that you are talking about

3 0
3 years ago
Other questions:
  • How can you ensure you don't go over your budget?
    8·1 answer
  • Some websites are dedicated to cataloguing information. Since these sites contain so much data, these sites are usually organize
    11·2 answers
  • In a five-choice multiple-choice test, which letter is most often the correct
    10·2 answers
  • "The principle of ______________ states that programs tend to access data and instructions nearby recently used data and instruc
    12·1 answer
  • Alicia uses a software application to store the names, email addresses, and phone numbers of her friends in alphabetical order. 
    11·1 answer
  • What is the limitation of computer<br>​
    5·1 answer
  • Cuales son las paginas web​
    12·1 answer
  • Find each of the following products using distributive property a) 735 × 16​
    12·1 answer
  • A machine that converts energy to useful work.
    9·2 answers
  • Any mobile devices contain a(n) ___ and gyroscope that can sense even the smallest movements.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!