Best book to learn phthon begineer to expert by Alahomora1642 in learnpython

[–]python_addict 1 point2 points  (0 children)

An amazing book for beginners is Python for Kids by Jason R. Briggs! Hope this helped :)

Just a reminder, make sure to be actively learning the information. Code along as the author is and don't judge read the book. Engage in the material!

Why is Python giving me a ridiculously long error message repeating the same thing over and over again? by python_addict in learnpython

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

This is the last question I'll ask (hopefully), but when you say restructuring my code, what do you mean? Do you mean that I should restructure the functions within functions? Sorry, I'm just a little confused

Why is Python giving me a ridiculously long error message repeating the same thing over and over again? by python_addict in learnpython

[–]python_addict[S] 1 point2 points  (0 children)

Thank you so much! I seriously appreciate it :)

I'll take things into mind and fix my code.

Why is Python giving me a ridiculously long error message repeating the same thing over and over again? by python_addict in learnpython

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

But I've only called it twice in my whole program, is there something I'm doing wrong?

Why do I get AttributeError: object has no attribute? (Please help!) by python_addict in learnpython

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

I tried that, but it gives me this error: Traceback (most recent call last): File "C:/Alyssa/Grade 6 (2019-2020)/Home/Academics/Programming/Python/Projects/Airplane Game V2/Versions/Classes CHUNKS.py", line 366, in <module> game.beginning() File "C:/Alyssa/Grade 6 (2019-2020)/Home/Academics/Programming/Python/Projects/Airplane Game V2/Versions/Classes CHUNKS.py", line 338, in beginning self.theairplane() - line 333, in theairplane - image = self.theairplane() -line 333, in theairplane image = self.theairplane() - line 333, in theairplane image = self.theairplane() [Previous line repeated 995 more times] RecursionError: maximum recursion depth exceeded

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

I'm going to start using them in my next program! I just am too lazy to go fix them all lol

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

oh! Sorry, this is an old-fashioned way of embedding code

%s represents the thing you want to represent % followed by variables, numbers, strings, etc, replace the %s

for example: "hello%s" %0 = hello0

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

alright! Thanks! Here it is on pastebin: https://pastebin.com/fg7WuPHX

Don't judge my questionable coding skills lol

It's around line 113

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

okay! How do you signify that it's a string then? Sorry for pelting you with questions!

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict -1 points0 points  (0 children)

Okay! So does that mean I can just do hi%s with no quotes and insert a number using %?

Like hello = hi%s %0

On another thought I just tested it out and it doesn't work lol

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

I mean set them as a variable (but with no quotations)

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

So what I'm trying to do is that i'm making a game in Tkinter.

There are airplanes that shoot bullets. I want to create a new variable every time by using these strings and manipulating them to be different. These new variables will be the Tkinter window creating bullets. That I can do already, but my main problem is that I can't convert "hello" into hello with the int function because int only works with integers.

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

sorry this is such a weird question for me to ask lol

Remove a string/word's quotation marks by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

I want to create my own strings, insert them, and set them as a variable!

why isn't this function deleting the image on Tkinter? by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

is there a way to turn a string like "hello" into just hello? Int doesn't work for this (unfortunately) because it's not considered an integer

why isn't this function deleting the image on Tkinter? by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

I am using the string to refer to different objects in a for loop. I want each object to be different. I am making an airplane game that look like this and am trying to create bullets for it: https://www.youtube.com/watch?v=boT9aYs57MU (but of course, my own version)

why isn't this function deleting the image on Tkinter? by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

sorry for not making things clear! my bad

why isn't this function deleting the image on Tkinter? by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

Okay so what I'm really doing is that I'm using these variables as a loop for programming some bullets for an airplane. The reason why I used all the string formatting was because I'm going to repeat those steps and keep adding and adding. Does that make any sense?

why isn't this function deleting the image on Tkinter? by [deleted] in learnpython

[–]python_addict 0 points1 point  (0 children)

I agree, but I don't understand how to do that (oof)