[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Learning Python

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 1

File: IMG-20160915-WA0000.jpg (89KB, 1024x576px) Image search: [Google]
IMG-20160915-WA0000.jpg
89KB, 1024x576px
I was tasked with learning how to blend sounds with Python. I am supposed to only use JES to do so. This is how far I have gotten and everything seems right but when I hit load program no sound plays..nothing happens. Anyone here that can help?
>>
Any help?
>>
>>56617065
install gentoo
>>
>>56617065
Do you get any output/error messages

Have you actually called the function?

For example
BlendSounds()
>>
>>56617468

That might be what's missing. In the textbook they gave us and the instructions for learning how to do this it left that out. I should have figured it out but still.
>>
>>56617065
Doesn't look like you're actually calling anything
>>
>>56617505
If you're pretty new to Python then I would imagine that is the fix haha, but in a nutshell, once you write a function, you need to call the function.

So in your case, it won't be BlendSounds() (typo), it'll be blendSounds() at the bottom.

Let me know how you get on
>>
>>56617505
Also, it doesn't look like you have imported anything - so once you call the function it will say, NameError makeSound or something because that's not a built in function.
>>
>>56617631

it worked. I had to make it so a new person could run the program and it would work for them. so what I just did was add
setMediaPath() to the beginning and blendSounds() at the bottom. they played and it worked!
>>
>>56617734
>>56617734
That's pretty cool. What is it your learning by the way, I've never used Python to play sounds but I've always wanted to make a program that would enable full volume and play a sound. Can you let me know the book/material/source you're reading?
>>
>>56617756

The class is CST-110 Intro to Computer Science

The textbook is The Practice of Computing Using Python.

The instructor for the course is very poor at it. Basically gives the assignment but doesn't prepare or lead us into the ability to do it. All of our learning is being done through mostly internet research or like I just did with you guys.
>>
>>56617812
All compsci intro courses are like that.

Its going to be a long tough road learning CS for you, the best thing to do is look at other people's code and try to emulate industry best practices.
>>
>>56617812
That's pretty shite that your instructor is a ballbag. Don't let it put you off though, it's a very useful language to learn.
>>
>>56617851

Well my degree is actually B.S. in IT with emphasis in Cybersecurity.

I knew I would have to learn some programming but not entire languages.
>>
>>56617948
Not gonna lie, your degree sucks. Its not a field that people invest lots of money in professor wise so the education is shitty, and its not a real Cyber Security Engineering degree so you dont get the respect that comes with a BS in Engineering.

Its pretty fucked man. Only saving grace for you is that the degree is legitimately easier than their Engineering or even CS counterparts.
>>
>>56617948
A piece of advice from someone who has done your degree. You may think that programming is completely unrelated to computer security or whatever, but if you believe that - then you'll make things seriously difficult for yourself when you graduate.

If I had the chance to re-do it over again, I'd self learn multiple relevant programming languages.

For example, if you start learning how to reverse engineer assembly while your studying, I'd hire you on the day you graduate. Honestly, it's invaluable - unfortunately you don't get told this when your studying and we all naively think that we'll be taught everything we need to know when we study degrees.
>>
>taking a picture of your screen
>>
>camelcasing in python
kill yourself
>>
>>56618239

At least he's programming and not bikeshedding about unimportant things like you.
>>
>>56618224

I actually did that to share what I had done on my desktop through my phone with whatsapp. Myself and others in the class are all trying to come together to learn.

>>56618205
I am currently in the Army and work around the Cyber defense guys and I never really heard them talk about this. I do not plan on using my degree while I am in but hopefully when I am out. I will have to start looking into that. Thanks for that suggestion.
>>
>>56618298
this guy >>56618239 has a point though. Its better to begin learning the different conventions of various languages early to avoid building up bad habits.
>>
>>56618239
>Caring about how people apply their own coding conventions in their private projects
kill_your(self)
>>
>>56618450
Well to be honest, reverse engineering is only necessary if you want to be the cream of the cream. I'd start with Hacking - The Art of Exploitation - buy the book because it comes with a Live CD. It means that every vuln in the book will 100% work.
>>
>>56619177
But learning programming languages and in particular, C, is pretty good for being able to find overflows etc.
>>
>>56618298
pep8 you retarded faggot
Thread posts: 25
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.