Program a Trivia with python using PySimpleGUI - python

I am programming a trivia by using PySimpleGUI by using checkboxes, inputs, combos and radios, for which i haven't been able to amy resource or code so I could understand how can i mark the right answer from the others.
Does any one has ever done anything similar to it that could help me understand what do I have or can do to solve my problem?
I understand that for getting the exam check at the end i have to put if/elif/else for the answers but i cannot put myself together on how ot display which one is the correct answer, but i dont understand how to put everything together and make the system record the wrong answer so it could be displayed when the user is checking the answers.

Related

Why is this While loop both doing and not doing what i told it too? (Python)

So, before i begin, I'm going to say that I'm still learning Python, so while any answers are very appreciated, please don't give any advanced answers. So i just learned about while loops, and I'm coding in Reeborg's World. i am using the same code as my teacher, but when i run it, i create an infinite loop. here is a link to a pic of my code:
My code
and here is a link my my teacher's code:
Teacher's code
Any ideas why I creating an infinite loop, and my Teacher isn't?
Thanks much,
SmallCoder12
i tried adding multiple conditions to the while loop. i wanted it to go all the way to the flag, but instead it made Reeborg run into the wall.

Python: Get html data from a user based website

I am very sorry for the horrendously worded question as I don't know how to phrase it differently. I am currently trying to make a bot play a game like skribbl or kahoot where you join, input a name and play. However I cannot just web-scrape the data with the join link as all the 's are empty and no new player joins. So how can I make a bot that joins the game. I don't necessarily need code. But I need resources to learn, I don't know what this kind of coding would be called.
Given I could just take screenshots frequently of my screen and try to go from there but I feel like it would be better to not do that and I want to expand my knowledge.
If this is not possible in python what other languages would be preferable?

Use Python to monitor a program then make input once certain perameters are met?

If there is already a post with this kind of information somewhere, please link it and I will gladly use that information. I tried my best to research it and haven't been able to find anything concrete.
That being said, I guess I should start with is it possible?
What I'm looking to do is write a python script that will monitor a program, then once certain parameters are met, I want the python script to make certain inputs on the program. To be more specific, I want to use a python script that monitors the program "PredatorSense" from Acer, and once certain temperatures are reached, I want the script to automatically change the fan speed to an rpm I specify once these temperatures are met. This is doable manually through this software, but it usually happens i'm playing a game so i'd have to minimize the game, change the speeds, then switch back.
To answer a question i'm sure some reading this may ask "Why not just have the fans set to auto and then let the program do it's thing?" well my answer to that question is this: The program doesn't let the fans get to certain speeds unless in "turbo" mode, which keeps the fans at max speeds the entire time, which are really loud. I'd like to only have them at max speeds when necessary to keep below a certain temp.
If the question was asked poorly, please feel free to let me know so I can word it better. Thanks in advance for your help!

How do I prove to users that something is safe?

Sorry if this seems like some simple question to lots of people. But basically I was working on some rotation calculator for a game I play - for fun. I thought why not share it with the gaming community in reddit in the form of a .exe so everyone could use it (without have to install python and made using Pyinstaller). I understand the risk of malware .. which is my problem. Short story short it got removed with the following message:
" As pointed out in the comments, alot of players are careful about what they click on. If it's not a known download they use they will report it which in turn means it gets removed."
I know this is safe, but i have no way to prove to others it is, which is where i'm stuck. What can i do about this?

Condensing python code for creating tkinter widgets

I have a program that I'm designing to teach myself Python but have gotten stuck. I've run across a way to condense python code using % and a list of arguments to have it run as code and looping through the list of arguments until it's done, but can't seem to find it in the documentation or with Google, mostly because I can't figure out how to search for it (sadly it's pretty vague I know).
Mostly what I'm trying to do is prevent having to write approx. 300 lines simply for GUI buttons, labels, frames, ect. with very few changes between them.
Obviously the code is huge so it's all available at Github, github.com/kari-fox/MixxMaster. I'm looking for any kind of recommendations for condensing all of the GUI elements, mostly because I find myself copy/pasting any time I need to make minor changes to any of the similar pieces.
Thanks to Steven Summers in the comments for mentioning classes. I had no idea they were so powerful! I found this guide (https://jeffknupp.com/blog/2014/06/18/improve-your-python-python-classes-and-object-oriented-programming/) and it made understanding and implementing classes work perfectly! That helped me cut out almost 100 lines of purely window-building code and let me do a few sneaky things besides. If anyone wants to see the full implementation check out the github link in the question.

Categories