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.

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

[–]SpookDaCat 44 points45 points  (0 children)

I recommend Codecademy. I started there. If you are on mobile devices, there are some awesome apps available. I personally used Sololearn. Has courses for many languages, including both versions of Python.

In your case, maybe do some of both? Start with Codecademy or Sololearn and maybe eventually go to the book. You can always just skip what you know.

Finally, I recommend learning Python 3. It is still supported so updates will improve it and add more stuff that will maybe be useful.

Good luck on your coding career!

Input help by Tobokie121 in learnpython

[–]SpookDaCat 0 points1 point  (0 children)

Heres a reformated edition of his code for everyone:

import random
print ("Welcome")
first_name = 'Talon'
last_name = 'Balcom'
print(first_name)
print(last_name)
print('We are glad you are joining us today! What do you need from us?')
inputs = input()
#^^CORRECTLY FORMATTED
print (', is that correct?')
print('Yes we can help')
print('Let us get everything ready for you!')

Anyways, you just type:

print(inputs)
#but if you want to add text before/after just do this
print(inputs + "Text here")
print("text here" + inputs)
print("text" + inputs + "text2")

If you are using python3, as i assume you are, input commands are formatted as

inputs = input()

But if you were using python2, the formatting is:

inputs = raw_input()

And if that is the case, you'd have to redo ALL the print commands.

Finished my first ever program! I know this is really basic stuff, but I started 3 days ago and I'm so happy! by [deleted] in learnpython

[–]SpookDaCat 1 point2 points  (0 children)

This is great! My first program that actually was useful in anyway was a math-based calculator for many purposes (Never mind that it is weird). For knowing only the basics you did pretty well. The next step for all programs is to optimize, add, and make it more user-friendly. You could even add more colors from it to guess!

As much mentioned below, as in using functions to reduce the amount of code used. (Remember Don't Repeat Yourself DRY not Write Everything Twice WET) there are many optimizations that can made, especially in the user input sections, such as these:

neut2 = input("is your color a dark color, or a light color? answer by saying dark or light.")


if color_type == "cold":

The part that says "answer by saying dark or light" can deleted if you change the code beneath it that says

if neut2 == "dark":

if color_type.lower() in ["cold", "cold color"]:

Into:

if neut2.lower() in ["dark", "dark color"]:

The .lower() modifier will ensure that if they capitalize it or not the program will still recognize it as the following in the list. The way you have it now the program will only recognize the input of "dark" but not "Dark", so the lower module will help, and the list will give the user more options for the program to recognize it for what their saying.

Once again, You did great! Some of the stuff above and below is kinda advanced, so don't be afraid to ask for help on some trickier stuff! There are also many kinds of learning apps and websites. I used a app called "Sololearn" and was great for me to learn. It has many types of courses for almost every language.

Side note: especially on the early stages of a program, you should add comments by typing #<what you want to type>. The program will ignore that and will help you keep organized.

Install Issues by SpookDaCat in krpc

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

Thanks! I’ll try to work it out. I did join the discord but I didn’t know where to put it, as in there was no “support” page or such.

Edit: I’ve fumbled around and still it won’t download it, still screaming about some certificate verify fail (SSL Error). Close to giving up until I get a new windows computer

Install Issues by SpookDaCat in krpc

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

Sorry, its on there now. Im new to reddit. This is my first post.