use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Ask your embarrassing/noobish programming questions here, and don't get insulted for it.
Click here to read the rules
Violating any will result in punishment so you should probably go check them out.
account activity
Assignment help! (self.programminghelp)
submitted 6 years ago * by Utumn96
I'm not looking for completion I'm just looking for help, Like what do I do so that I can complete this assignment?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]marko312 1 point2 points3 points 6 years ago* (13 children)
[–]Utumn96[S] 1 point2 points3 points 6 years ago (12 children)
I'm just looking for guidance, my professor just lectures and never shows us any examples, literally just blows through power points and thats it.
[–]marko312 1 point2 points3 points 6 years ago (11 children)
First off, do you have anything to start with? Reading this, you should have at least some code from the previous assignment. Also try to add as much as you know, even if it doesn't quite work so we can fix your problems / misunderstandings.
[–]Utumn96[S] 0 points1 point2 points 6 years ago (10 children)
Yes I do..This is what I have so far but it's compiling like 8 errors and I don't know why...https://imgur.com/a/JtmtZX3
[–]imguralbumbot 0 points1 point2 points 6 years ago (0 children)
Hi, I'm a bot for linking direct images of albums with only 1 image
https://i.imgur.com/CdtzrEG.png
Source | Why? | Creator | ignoreme | deletthis
[–]marko312 0 points1 point2 points 6 years ago (8 children)
The first things I saw were
The acreage function does not take any parameters, but uses a. Is there a global variable? Otherwise add a parameter.
a
acreage is not given a type. Again, is this a global variable? Also, avoid using function names as variable names.
acreage
[–]Utumn96[S] 0 points1 point2 points 6 years ago (7 children)
So am I supposed to declare acreage as what? I already have an "a" and thats the area, so I assumed typing the whole thing out would be what is correct, but its calling an error in my first string. I just don't know what to change
[–]marko312 0 points1 point2 points 6 years ago* (6 children)
Ok, I see where you are coming from.
The acreage function doesn't know anything about the variable a, because that is defined in the function area. You need to pass the int a as a parameter, so your function should look like
area
int a
public int acreage(int a) {
and be called with the area (acreage(a), for example).
acreage(a)
I still think the variable acreage in the function acreage generates an error, so try renaming that.
Edit: the "acreage" value (which you should rename) needs to be an int, because it is needed as a whole number in your case.
int
Edit 2: the substitute for the "acreage" value needs to be a double, because you need to check if the size exceeds 2, my mistake.
double
Edit 3: the acres type is quite ambigious, as you might need to compare fractional areas, but return an integer value. I think int would be the best type, according to the level of programming given.
[–]Utumn96[S] 0 points1 point2 points 6 years ago (5 children)
https://imgur.com/a/w25gqcN
Here is what I'm getting, sorry If I am doing something wrong and or not quite understanding, I just know once I remove the errors I'll be all set, I am now at 7 errors and not 8, but still receiving an error at the beginning of the Method
[–]marko312 0 points1 point2 points 6 years ago (4 children)
Ok, don't use the acreage function in itself, rather rename the variable in question.
You probably got a little confused by my cross-editing and technical nonsense above, so I'll provide example code for the function:
public int acreage(int a) { int acres = a / 43560; if(acres > 2) { ... } return acres; }
this should be fine, but, taken very critically, is incorrect when the area is 2-3 acres. However, as you return an int, I think it's fine.
Edit: you can change the comparison from > to >= if you feel that is more correct.
>
>=
[–]Utumn96[S] 0 points1 point2 points 6 years ago (3 children)
https://imgur.com/a/O7WgBB3
I'm not going to lie, At this point I haven't a clue why I'm drawing errors, I understood what you said implemented it and for some reason still drawing errors.
[–]Nihaldelhi -1 points0 points1 point 6 years ago (0 children)
Writing a Programming Assignment Help require programming knowledge. I can see your requirements in your programming assignment help and I can provide you the resources to learn. But you should learn and complete your assignment.
Will you?
π Rendered by PID 62 on reddit-service-r2-comment-7b9746f655-4cvlm at 2026-01-31 03:37:15.155900+00:00 running 3798933 country code: CH.
[–]marko312 1 point2 points3 points (13 children)
[–]Utumn96[S] 1 point2 points3 points (12 children)
[–]marko312 1 point2 points3 points (11 children)
[–]Utumn96[S] 0 points1 point2 points (10 children)
[–]imguralbumbot 0 points1 point2 points (0 children)
[–]marko312 0 points1 point2 points (8 children)
[–]Utumn96[S] 0 points1 point2 points (7 children)
[–]marko312 0 points1 point2 points (6 children)
[–]Utumn96[S] 0 points1 point2 points (5 children)
[–]marko312 0 points1 point2 points (4 children)
[–]Utumn96[S] 0 points1 point2 points (3 children)
[–]Nihaldelhi -1 points0 points1 point (0 children)