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
Audra recently earned her associate’s degree and is looking for a job. Her resume lists her strengths in a separate section. Som
zhuklara [117]

With Audra’s associate degree and list of qualifications, she will be looking for an entry-level position. The position that would be most suitable for her would be (D) auditing clerk.

She will not quality for an Accountant and Marketing Manager position, which requires a longer amount of experience as well as a higher degree of education, and she is overqualified for the Data Entry position which does not require her level of qualifications.

8 0
3 years ago
Read 2 more answers
Write a program to assist a cashier with determining correct change. The program should have one input, the number of cents to r
SCORPION-xisa [38]
```
#!/usr/local/bin/python3

import sys

coins = { "quarters" : 25, "dimes" : 10, "nickels" : 5, "pennies" : 1 }

def mkChange( balance, coin ):
    qty = balance // coins[ coin ]
    if( qty ):
        print( str( qty ) + ' ' + coin )
    return( balance % coins[ coin ] )

if( __name__ == "__main__" ):
    if( len( sys.argv ) == 2 ):
        balance = int( sys.argv[ 1 ] )
        balance = mkChange( balance, "quarters" )
        balance = mkChange( balance, "dimes" )
        balance = mkChange( balance, "nickels" )
        balance = mkChange( balance, "pennies" )
    else:
        sys.stderr.write( "\nusage: " + sys.argv[ 0 ] + " <change owed>\n" )
```


5 0
3 years ago
I. A teacher can prepare a slide and demonstrate it in the class with the help
marin [14]

Answer:

ay di ko alam yan hahahaha

3 0
2 years ago
True / False<br> Generally, more orthogonal instruction sets are considered less elegant.
Cerrena [4.2K]

Answer: True

Explanation:Orthogonal instruction set is the set of instruction that can use can use all addressing mode. They have independent working and so instruction can use any register the prefer and this leads to overlapping in instruction and complexity.

When RISC architecture got introduced ,it got more preference due to reduced instruction and less complexity as compared to orthogonal instruction.So it not considered elegant to have more orthogonal instruction.

6 0
2 years ago
A network engineer executes the following command sequence (-i specifies the TTL of the ICMP packet sent):
harkovskaia [24]

The correct option is D. tracert; This sequence emulates is utilities for the command sequence.

<h3>Explain the term command sequence?</h3>

We can complete operations that need numerous phases thanks to sequence, which refers to the order in which commands are processed by a computer.

  • Sequence is indeed a basic algorithm in programming: a series of sequentially carried out logical steps.
  • Network engineers create and implement network setups, address performance issues, monitor networks, and set up firewalls and other security measures.
  • By delivering Internet Control Message Protocol (ICMP) is  echo packet to a target, the TRACERT diagnostic tool ascertains the path to the location.

Thus,  utilities is emulated by this sequence is TRACERT .

To know more about the command sequence, here

brainly.com/question/27703743

#SPJ4

3 0
1 year ago
Other questions:
  • In​ today's global​ environment, everything and everyone are digitally connected to everything and everyone else. The term used
    6·1 answer
  • If a surface is. it is exactly vertical
    11·1 answer
  • On an Android device, where can a user find the correct app to use to sync contacts and apps among devices?
    10·1 answer
  • The approved systems design document is used by programmers, the personnel department, and information systems personnel.
    8·1 answer
  • When people talk about "the media," they often mean:?
    6·1 answer
  • Which part is the author’s address?
    5·1 answer
  • Which of the following is an anxiety disorder
    5·2 answers
  • Which statement is true about customizing presentation programs? A. You can add multiple animations to an object in a slide with
    14·2 answers
  • Expectation on Information Technology Fundamental​
    12·1 answer
  • Camila wanted to increase the readability of her company newsletter. To do this, she added _____.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!