Can anyone help to write the Marie Assembly language code for the following question?

Thread Starter

Dharshika

Joined Jan 4, 2020
3
How to write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers:
(i) Count, (ii) Minimum value, and (iii) Sum of the numbers.

As an example, if the user enters the following decimal numbers as input (one after the other)
23, 6, 78, 36, 3, 250, 127, 210, -5
the program would output the following values as the count, minimum and sum respectively:
8
3
733
Assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.
Write comments within your program so that a reader can understand it easily.
 

djsfantasi

Joined Apr 11, 2010
6,196
How to write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers:
(i) Count, (ii) Minimum value, and (iii) Sum of the numbers.

As an example, if the user enters the following decimal numbers as input (one after the other)
23, 6, 78, 36, 3, 250, 127, 210, -5
the program would output the following values as the count, minimum and sum respectively:
8
3
733
Assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.
Write comments within your program so that a reader can understand it easily.
Hi!

Did you notice that this forum is named “Homework Help”. It’s most definitely NOT named “Homework Done For You”.

As such, there are some rules in here that are different than other sub-forums. The biggest one is that members are not allowed to give direct answers. We could have our access limited if we did.

You have to do the work. For example, we need to see your attempt at writing the program. Then, we can comment on what you’ve done.

So please provide us your work thus far and let us know where you are having difficulties

Looking forward to helping you. Programming is my thing
 

Thread Starter

Dharshika

Joined Jan 4, 2020
3
def main():
pass
lista=[]
x=1
while x > 0:
x = int(input("Enter number:"))
lista.append(x)

lista.remove(-1)
print(lista)
print(len(lista))
print("Minimum value=",min(lista))

total=0
for ele in range(0, len(lista)):
total = total + lista[ele]

print("the sum=",total)

if __name__ == '__main__':
main()
 

MrChips

Joined Oct 2, 2009
20,329
MARIE programming language was designed to teach the fundamentals of computer architecture and coding.
Not all computer languages can be translated into another computer language. This is such a case.

If would be futile to try to do this.
 

Thread Starter

Dharshika

Joined Jan 4, 2020
3
Could you please help me to solve a question related to Marie Assembly Language code then please. I know only basics . I need anyones help on the followimg question .

MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers:
(i) Count, (ii) Minimum value, and (iii) Sum of the numbers.

As an example, if the user enters the following decimal numbers as input (one after the other)
23, 6, 78, 36, 3, 250, 127, 210, -5
the program would output the following values as the count, minimum and sum respectively:
8
3
733
Assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.
Write comments within your program so that a reader can understand it easily.
 

djsfantasi

Joined Apr 11, 2010
6,196
Just a heads up for AAC members. This is not the only post this noobie has on AAC regarding this topic.
 
Last edited:

ci139

Joined Jul 11, 2016
1,195
personally i think a practical example with enough detail comments as for a kick start to newbie is more efficient than hoping that he/she would grasp a lot of things unfamiliar out of the thin air -- the persons own choice if it remembers it (learns from) or not

if we had here a "conference area" then such step by step guidance (in real time) made sense -- but instead the member posts , then after a day or couple someone notices , then a lot of steam goes to specifying the exact subject . . . everyone gets bored before any progress can be made
_____________________
what lot of people don't do is a parallel list/log/conspect/glossary -- basically a quik lookup index with definitions and formulas . . . by hand , then you systematize optimize and rewrite it and systematize optimize and rewrite it and . . . so theres double memory (seeing , writing) about your own developing associations scheme for the subject . . . there is a motivation to keep your formulas and data valid when you also use them yourself
 
Last edited:

WBahn

Joined Mar 31, 2012
25,297
Could you please help me to solve a question related to Marie Assembly Language code then please. I know only basics . I need anyones help on the followimg question .

MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers:
(i) Count, (ii) Minimum value, and (iii) Sum of the numbers.

As an example, if the user enters the following decimal numbers as input (one after the other)
23, 6, 78, 36, 3, 250, 127, 210, -5
the program would output the following values as the count, minimum and sum respectively:
8
3
733
Assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.
Write comments within your program so that a reader can understand it easily.
MOD NOTE: Thread closed -- you've already asked for someone to do this assignment for you in another thread.
 

WBahn

Joined Mar 31, 2012
25,297
personally i think a practical example with enough detail comments as for a kick start to newbie is more efficient than hoping that he/she would grasp a lot of things unfamiliar out of the thin air -- the persons own choice if it remembers it (learns from) or not
They aren't being expected to grasp a lot of unfamiliar things out of thin air. Keep in mind that it is an assigned problem in which the expectation is that they have already been exposed to everything they need to be able to solve the problem on their own. So it doesn't seem unreasonable to expect them to be able to make at least some kind of a start at an attempt. It is also an assigned problem in which whatever they turn in will receive credit based on the assumption that the work submitted was done by them and that they understand it, so we need to be mindful about not providing so much information that they can substitute what is provided here for their own work and understanding; not only do they then receive credit they don't deserve, but worse it is setting them up for future failure by helping them progress in their studies without actually learning things they need to understand to tackle what is coming at them later.
 

ci139

Joined Jul 11, 2016
1,195
They aren't being expected to grasp a lot of unfamiliar things out of thin air.
No ofence to my college physics teacher -- but at the end of the last year (long ago) he got a flue and asked his brother (physics engineer) to replace him -- well we (the entire class) learned more with him in one day than with his brother in several years -- and that because the practical engineer could bring out simple easy (to grasp for the cause~result) examples from real life occasions -- he barely needed to explain anything twice
 
Top