Answer:
userInput = str(input("Enter your sentence here.\n")).upper()
def getPigLatin(userInput):
splitInput = userInput.split(" ")
newList = []
for word in splitInput:
firstLetter = word[0]
if len(word) == 1:
word += 'AY'
newList.append(word)
else:
word = word.strip(word[0])
word += firstLetter
word += 'AY'
newList.append(word)
print(*newList, sep= " ")
getPigLatin(userInput)
Explanation:
This solution is done in Python
First the user is prompt to enter a statement, the statement converted to string and also capitalize using str and upper() built-in function. The user input is assigned to userInput variable.
The getPigLatin function is defined and it accept a string as parameter. Inside the getPigLatin function, the userInput is splitted and assigned to splitInput variable.
An empty list is also initialized and assigned to newList. Next, we loop through the splitInput. During the loop; we first check if the length of an element is one, then we just add 'AY' to the element and add the element to the newList. Else, if the element length is more than one; we strip the first letter from the word and also re-assign it to word, then the stripped first letter is added to the end of the word. Next, 'AY' is added to the word and the element is add to the newList.
The last line of the getPigLatin function display the entire element of the list using a space seperator.
The last line of the entire solution call the function passing in the userInput as argument.
The best and most correct answer among the choices provided by the question is the third choice "It will be a space laboratory for scientists"<span>
The main purpose of the International Space Station<span> is to provide an </span>international<span> laboratory for experiments within the </span>space<span> environment. Which, despite all our technological advances, is nearly impossible to replicate here on Earth.
</span>
I hope my answer has come to your help. God bless and have a nice day ahead!</span>
A field whose data type is URL address data can store text that can be used as a hyperlink address.
Answer:
A key benefit of inheritance is: an object can have several types, it is type compatible with any of its super classes
Explanation:
- Inheritance is one of the fundamental concepts of Object Oriented Programming.
- Inheritance allows classes (derived classes) to inherit the methods and properties of a class (base class).
- The class or classes that inherits the characteristics from another class is called a derived class, child class or sub class. Derived class can also has it own methods and attributes additionally.
- The class whose methods and properties are inherited by the derived class or classes is called a base class, super class or a parent class.
- Benefit of inheritance is that inheritance new objects can take properties of existing objects and an object can have many types.
- Also a child class can inherit from more than one super classes which is called multiple inheritance.
- Multiple inheritance allows a class to implement more than one abstract classes.
- An object can have several types. These types can be of an object's own class and also other types which include all classes that a class inherits.
- If a variable is declared to be the type of super class then value of that variable can refer to any instance that instantiated from any class that inherits that super class. This means that an object is type compatible with an of its super classes.