Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am currently making a quiz through python and Tkinter. I’m trying to use txt files, one for my questions and one for my set of answers for the said question, as well as one for explanations for the answers. However, I’m not sure how to implement this into my code. I’m not sure how to retrieve a question from the txt file and represent it as a label while having the correct set of answers that are associated with that question and represent them as buttons for the user to choose. As well as display the text for the correct explanation for the answer.
You can write a function that do that. Something like:
def write_to_txt(path, my_word):
with open(path, "w") as my_txt:
my_txt.write(my_word)
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 days ago.
Improve this question
How do I start a code in Python? Is there any formula/rule or so I can or have to use/follow?
I have read so much about all different types and functions in python, and still am not able to simply start with a code, although I know in my mind, what is to be considered.
I tried to start, there where error messages I didn't understand, then I went to ChatGPT and all my ideas were most of the time correct, but I can't create the right form of the code.
And somehow I am not able to get it out of all the stuff I already read.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 days ago.
Improve this question
I am looking forward to building a program in python which tells if a text is fake or real. This is a project I want to start for educational purposes. For example, someone is sharing a story, the program will check the input and will determine whether the author is likely telling truth or fiction based on common patterns. I am looking for some things I can start off from, like libaries or documentation. Thanks for anyone who is willimg to help.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this question
I am new to the world of image processing. And I am working on a project, where I need to find the narrowest and widest part of a letter/object like the one I have attached to the post. I have tried many things, but I do not get proper results. Can you help with a way to approach this. I am mostly using Python and OpenCV.
Thanks in advance!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
So, i'm on assignment at school where i have create my own dice rolling game, i have completed everything but all i have to do now is store the scores that the user gets into a external file. I am new and have no idea how to do this, so could anybody help me out? Thanks!
You can try this kind of code.
with open(file, "a") as f:
f.write("write your content" + "\n")
But there are plenty of pages describing how to write content into files. Did you try these examples?
Reading and writing files in Python.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am beginner of Python, does anyone knows how to make a different shapes of message windows in python? i want to design a better look and friendly GUI.
Thank you
I think Qt is what may be useful to you. Take a look at the documentation on QtProject homepage. Lots of tutorials can be found on the Internet. For your specific problem take a look at this SO question.