A class can be defined<span> using another class as a foundation. In object-oriented programming terminology, one class can </span>inherit<span> fi elds and methods from another. An object that inherits from another is called a subclass, and the object it inherits from is called a superclass. A subclass extends the superclass.</span>
Answer:
oops omg who did that? I feel bad
Answer:
Following are the program in the Python Programming Language.
#set the infinite while loop
while(True):
#get string input from the user
name=input()
#get integer input from the user
num=int(input())
#set the if statement to break the loop
if(num==0):
break
#otherwise, print the following output
else:
print("Eating {} {} a day keeps the doctor away.".format(num, name))
<u>Output</u>:
oranges
5
Eating 5 oranges a day keeps the doctor away.
apple
0
Explanation:
<u>Following are the description of the program</u>:
- Set the loop that iterates at infinite times and inside the loop.
- Declare two variables which are 'name' that get string type input from the user and 'num' that get integer type input from the user.
- Set the if conditional statement for break the infinite while loop.
- Otherwise, it prints the following output.
It will most likely begin to crash and eventually just freeze , i'm guessing