Task 1:INPSTA 99INPSTA 98INPOUTLDA 98OUTLDA 99OUT Task 2:INPSTA 99INPSTA 98INPADD 98ADD 99OUT Task 3:INPSTA 99ADD 99OUT Task 4:INPSTA 91INPSTA 92LDA 91SUB 92OUTLDA 92SUB 91OUT Taks 1:INPSTA 91INPSTA 92LDA 92SUB 91STA 99BRP 11LDA 91OUTBRA 56LDA 92OUT Task 2: INPSTA 91INPSTA 92SUB 91BRZ 10LDA 91ADD 92OUTBRA 54OUT Task 3:INPSTA 91INPSTA 92LDA 91SUB 92BRZ 8BRP 5OUT Task 4:INPSTA …
Category Archives: Uncategorized
Completing the square in Python
Inputs with a leading 0
Inputs with a leading 0 in python 2 are put into base 8 witch will result in breaking most programs and so “Variable = str(input())” Should be used instead to make the input into a string so it won’t be put into base 8. Alternatively, “Raw_input()” can be used as this will make the input …
Python GUI and Tkinter
Python has no inbuilt Interface and so a separate module tkinter must be imported with “Import Tkinter” This imports all of the tkinter modules so more commonly used is “From Tkinter import *” This will only import the modules needed for the script however all modules needed must be imported creating more hassle if lots …
Getting random numbers
Python doesn’t have random numbers function so instead the module must be imported with “Import random” Then the random function (random.randint(0, 5)) can be used