Answer:Gravity held the pieces of forming planets together. Gravity pulled most of the matter into the center of the solar system Gravity caused the planets and Sun to have spherical shapes.
Explanation:
<span>Schema classes define all objects that AD can handle.</span>
<u>Output:</u>
f1 in A
f2 in A
f1 in B
f2 in A
f1 in A
f2 in A
f1 in B
f2 in B
<u>Explanation:</u>
In this snippet, the code makes use of virtual functions. A virtual function is defined as a function that is defined in the base class and redefined in the derived class. If the derived function accesses the virtual function, the program will get executed with the derived class’s version of the function.
In this code, we define the virtual function f1() in class A and also redefine it in class B which is the derived class of A. While executing the program, the function g which takes the object b (class B’s object) as a parameter. It will print class B’s version of f1() rather than class A’s version. This is working off the virtual function.
A learning management system (LMS) is a software application for the administration, documentation, tracking, reporting and delivery of educational courses or training programs.
def replace_at_index(txt,ind):
new_txt = ""
for x in range(len(txt)):
if x == ind:
new_txt += "-"
else:
new_txt += txt[x]
return new_txt
s = replace_at_index("eggplant", 3)
print(s)
I wrote my code in python 3.8. I hope this helps.