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
Which of the following statements is/are true? (Points : 5) A. A default constructor is automatically created for you if you do
snow_lady [41]

Answer: Only A and C

Explanation: Default constructor is a constructor that has parameters with the values that are default or has no arguments/parameter present. Default constructor is not declared in the class rather it gets generated by itself when not defined.

Class is defined with data members, functions, objects etc are considered as per the requirement given by the user .It is the user defined concept.

Statement (B) is incorrect because static method is used for accessing the static members of the particular class and manipulate the value of it.

Thus, only statement (A) and (C) are correct.

6 0
3 years ago
Is this statement true or false? You can apply only one of these at a time: underline, bold, or italics. true false
Lelechka [254]
I think false not sure but let other people help u answer and u can decide
8 0
3 years ago
You try to enter your name into a cell that accepts a numeric value. What error would you receive
Phoenix [80]
Because it say numeric value that means numers and words/letters aren't numbers so it will say not a numeric value :) hope it helps

7 0
3 years ago
Read 2 more answers
Computer Vision and Industrial Robots
rjkz [21]

Answer:

View Computer Vision Unit Activity.docx from COMPUTER SCIENCE 101 at Edoptions High School. Consider an industrial robot performing several tasks in an assembly line.Machine Vision in industrial applications. Robots working in industrial applications need visual feedback. This is used to navigate, identify parts, collaborate with humans and fuse visua

Explanation:

Many industries are feeling the effects of skilled labor shortages. At the same time, companies are reluctant to invest heavily in training and developing unskilled employees, for fear of losing them afterward through defection to competitors. With no end in sight to the workforce shortfall, the appeal of robots as an efficient supplement, and even replacement, for human labor is continuing to grow.

The cost of robotics is generally falling, and alternative business models like robotics-as-a-service (RaaS) make industrial robots accessible even to companies that don’t have substantial capital budgets to exploit. The affordability of the units themselves, along with the fact that programming is becoming more straightforward and hence less costly, is also boosting the appeal of industrial robotics adoption.

7 0
2 years ago
Brainless is one the way if you help
V125BC [204]

Answer:

1. x - 6

2. p - ? = 7

i chose these equations because

a number - 6 = the weight of your backpack.

p - an unknown number without a substitute variable = slices of bread left.

3 0
2 years ago
Other questions:
  • ________ databases are better than relational databases at handling unstructured data such as audio clips, video clips, and pict
    11·1 answer
  • 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sideb
    14·1 answer
  • Write a fragment of code that will test whether an integer variable score contains a valid test score. Valid test scores are in
    6·1 answer
  • Which of the following code segments does not contain any errors?
    7·1 answer
  • Explain the SCAN disk scheduling algorithm. Explain why it is sometimes called the Elevator Algorithm.
    9·1 answer
  • What is conference proceeding​
    10·2 answers
  • In C complete the following:
    12·1 answer
  • Which statement in main() generates an error?
    15·1 answer
  • HELP ASAP, AND YES I KNOW, WRONG CATEGORY. SORRY!
    10·2 answers
  • What are the names of the components (each shown with a leader and a line) of a circuit shown in the diagram?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!