KnowledgeBoat Logo

Computer Science

Write instructions to get the following result :


Math is Fun so don't be resistant
Just learn the rules, the rules are consistent 
And most important, you must be persistent !

Adding fractions, get common denominators.
Multiply by missing factors to get the denominators. 
Add numerators only, NOT denominators.

Do it in both interactive mode and script mode.

Getting Started

104 Likes

Answer

Interactive Mode

>>> print("Math is Fun so don't be resistant")
Math is Fun so don't be resistant
>>> print("Just learn the rules, the rules are consistent")
Just learn the rules, the rules are consistent
>>> print("And most important, you must be persistent !")
And most important, you must be persistent !
>>> print("")

>>> print("Adding fractions, get common denominators.")
Adding fractions, get common denominators.
>>> print("Multiply by missing factors to get the denominators.")
Multiply by missing factors to get the denominators.
>>> print("Add numerators only, NOT denominators.")
Add numerators only, NOT denominators.
>>>

Script Mode


print("Math is Fun so don't be resistant")
print("Just learn the rules, the rules are consistent")
print("And most important, you must be persistent !")
print("")
print("Adding fractions, get common denominators.")
print("Multiply by missing factors to get the denominators.")
print("Add numerators only, NOT denominators.")

Output

Math is Fun so don't be resistant
Just learn the rules, the rules are consistent
And most important, you must be persistent !

Adding fractions, get common denominators.
Multiply by missing factors to get the denominators.
Add numerators only, NOT denominators.

Answered By

54 Likes


Related Questions