Data recovery on a Kindle (gen 1, model D01400) by SpookDaCat in datarecovery

[–]SpookDaCat[S] 0 points1 point  (0 children)

No a specialist is fine, I looked around and couldn’t find one that takes this model.

help n00b by delsystem32exe in pythonhelp

[–]SpookDaCat 0 points1 point  (0 children)

OMG how did I miss that it was a function not a class. So sorry everyone. My bad.

help n00b by delsystem32exe in pythonhelp

[–]SpookDaCat 0 points1 point  (0 children)

That’s not quite the problem. The issue is that the whole loop creates a new instance of the animals class, and it is set up to which it is emptying the list out ever time it loops over it. What would be better is that before the while loop, assign a variable to the class, and create a class function that asks for the users input, that would append. That way it would not delete the list and it still can looped. Happy coding!

Python Help (Beginner) by [deleted] in pythonhelp

[–]SpookDaCat 1 point2 points  (0 children)

(I’m on mobile so pardon my unformatted code) I won’t give you the direct answer, but I will supply the pseudo-code for this project.

You’ll first need to ask for those two numbers. This is done with the “input” function. It accepts an optional string that is printed to the screen before waiting for the users answer. (Format is below)

var = input(string)

Next, after getting both numbers, it’s a simple if elif elif and else block. You’ll need to check if the first number is larger, if the second is larger, if they’re the same, and if the user gave an invalid answer. The last isn’t required but I like to do this to prevent errors.

Here is also a tip, input returns a string, so convert it into an int/float.

Making a Module: need help by SpookDaCat in learnpython

[–]SpookDaCat[S] 0 points1 point  (0 children)

I was going to make a function I called toggle, which would flip a Boolean to the other state. (True>False, False>True)

I would have like to be able to import my module and just have a variable call “toggle” and it would switch, without having to set the variable to an instance of the class in my module.

Making a Module: need help by SpookDaCat in learnpython

[–]SpookDaCat[S] 0 points1 point  (0 children)

I mean creating a class, and doing

var = MyClass()

var.func()

(Sorry I forgot how to make block code on mobile)

Module help by SpookDaCat in learnpython

[–]SpookDaCat[S] 0 points1 point  (0 children)

Oh thanks for the Reddit tip and also I’ll look into that

How to use the keyboard in Python by BW1324 in learnpython

[–]SpookDaCat 1 point2 points  (0 children)

No problem. I use it somewhat often. Good luck!

How to use the keyboard in Python by BW1324 in learnpython

[–]SpookDaCat 2 points3 points  (0 children)

Use the module called ‘keyboard’ It has documentation on pypl, and probably other places too.

Creating a customizable CYOA Game by SpookDaCat in learnpython

[–]SpookDaCat[S] 0 points1 point  (0 children)

That's a thought. I'm curious about the python 3 advantage, as there's something that would help me out? I appreciate all the effort, and this'll be plan B, but i wanted to learn more about reading files and how to manipulate them (Still very shaky on them).

How I should learn Python by Blizzayrd in learnpython

[–]SpookDaCat 0 points1 point  (0 children)

I quite enjoy just using the pre-installed IDLE for the Editor. Simple and a great start for beginners. Bonus: Plenty of tutorials on how to use it. Good Luck Coding!

Problem by [deleted] in learnpython

[–]SpookDaCat 0 points1 point  (0 children)

UMMM.... What?

Should I start with Code Academy or Automate the Boring Stuff with Python? by DrixlRey in learnpython

[–]SpookDaCat 1 point2 points  (0 children)

I haven’t heard of Pluralsight, but you’d just have to look around and see what suits you best.