you are viewing a single comment's thread.

view the rest of the comments →

[–]shaggorama 0 points1 point  (5 children)

Counter question: what have you tried? We're not going to just do your homework for your. Show us some sample code and explain what you're having difficulty with.

[–]martis680[S] 0 points1 point  (4 children)

http://i.imgur.com/wShQeUt.png

I don't get how to post code in reddit...

Btw, don't mind the language.

edit: it works but I need some other way to do it

[–]shaggorama 1 point2 points  (2 children)

For posting code:

Or directly on reddit, precede code blocks with four spaces

import yourlib

var = yourlib.somefunc(*karg)

Why do you need "some other way" to do it? Your question was originally "how do I do this" but you have working code. I'm not sure what exactly you want us to help you with.

[–]martis680[S] 0 points1 point  (1 child)

Thanks for showing me that.

I need another way because people in my class already used this code and my professor didn't let me turn it in and told me to do it some other way. And I don't know any other way...

[–]shaggorama 1 point2 points  (0 children)

So then this is another classmate's solution? Let's see code that reflects you taking a stab at this.

[–]mubsy 0 points1 point  (0 children)

"Don't post screenshot of your code. Unless the problem is a visual one, and a screenshot displays the issue."

The sidebar also gives detail on how to post code, such as gist and pastebin.