[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
I've been trying to learn python classes...
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 6
Thread images: 2
File: 1453492765076.jpg (106 KB, 1280x960) Image search: [iqdb] [SauceNao] [Google]
1453492765076.jpg
106 KB, 1280x960
I've been trying to learn python classes for days, every site I go on explains it completely differently
help! ;_:

I want to make a class, then make what I guess are objects or instances of that class which will be actual visual items on the screen with values and attributes, but I can't get past this class shit without getting syntax errors out my ass
>>
File: 1447640324060.jpg (1 MB, 2329x2994) Image search: [iqdb] [SauceNao] [Google]
1447640324060.jpg
1 MB, 2329x2994
class tortoise:
name = ""
colour = ""
import tortoise()
terry = tortoise()
terry.name = "Terry"
terry.colour = "green"
TerryName = terry.name
TerryColour = terry.colour

print TerryName, " is ", TerryColour
>>
who do i get an error when I run JUST this
>>
Just do the free 'introduction to computer science 101' on www.udacity.com. You will be able to program quite a lot when you are finished. It is the best course I have seen. Made me realise that there are some really bright people at stanford. They could teach python to a cat.
>>
>>52640538
some notes on classes from one of my professors

https://www.ics.uci.edu/~pattis/ICS-33/lectures/class.txt
>>
>>52640538
>Switzerland will become a schengen country soon
How old is your image?
Thread replies: 6
Thread images: 2
Thread DB ID: 482874



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

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

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 shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.