McFly is a new programming language for mathematical operations that is being developed using Python. It is able to perform calculations based on the order of operations. Additionally, it can compare one number to another number using one of many comparison operations. McFly can also take in a quoted string of text and return that string without the quotes.
+
for addition.-
for subtraction.*
for multiplication./
for division.
==
for comparing if 2 numbers have the same numerical value.===
for comparing if 2 numbers are of the same type and have the same numerical value.>
for comparing if 1 number is greater than another number.<
for comparing if 1 number is less than another number.>=
for comparing if 1 number is greater than another number or has the same numerical value.<=
for comparing if 1 number is less than another number or has the same numerical value.!=
for comparing if 2 numbers do not have the same numerical value.!==
for comparing if 2 numbers do not have the same type and do not have the same numerical value.
and
checks if both values areTrue
. If so, then it will outputTrue
, else it will outputFalse
.nand
is the opposite ofand
.nand
is checks if 0 or 1 values isTrue
. If so, then it will outputTrue
, else it will outputFalse
.or
checks if at least 1 or 2 values isTrue
. If so, then it will outputTrue
, else it will outputFalse
.xor
checks if 1 of 2 values isTrue
. If so then it will outputTrue
else it will outputFalse
.nor
is the opposite ofor
.nor
checks for if both values areFalse
if so then it will outputTrue
, else it will outputFalse
.not
inverts the output of the boolean valuesTrue
orFalse
.
"
is used at the beginning and end of text to convert it to a string.
💡 The string output is printed without including the beginning and ending quotation marks.
#pi
is equal to3.141592653589793
#tau
is equal to6.283185307179586
#e
is equal to2.718281828459045
- Input:
3+3-3*3/3
Outputs:3
- Input:
#pi
Outputs:3.141592653589793
- Input:
3+#pi*2
Outputs:9.283185307179586
- Input:
3.0==3
Outputs:True
- Input:
3.14==3.5
Outputs:False
- Input:
3.0===3
Outputs:False
- Input:
True or True
Outputs:True
- Input:
"Hello World!"
Outputs:Hello World!
- Install Python version 3 or higher. (If you already have version 3 or higher of Python installed you may omit this step.)
- Navigate to the raw mcfly.py file on GitHub.
- Right click on the page and click
Save As...
- Save the file on your computer with the same file name and extension.
- Use Windows Explorer to navigate to where the
mcfly.py
file is stored. - Click into the Explorer Address Bar to highlight the text.
- Delete the text, type
powershell
in the Address Bar, press enter. - Powershell will open in the same directory you have navigated to.
- While in Powershell, run the command
python mcfly.py
. - McFly is running and ready to use if your terminal displays
Enter a math function:
💡 If you close powershell, you will need to repeat instructions 5-8 to rerun McFly.