I was wondering how to reset this program, and I need help. I have been looking everywhere for an answer, but I can't find a program that works. Can someone please help me?
print("Answer These MATH Questions")
def program():math = int(input("What Is 8 x 4: ")) if math == ("32"):print("You Got The Question Correct") else:print("Sorry You Got The Question Wrong Try Again") program()return
Answer
Use while like example. Don't use int for input - maybe it will not number:
while 1:math = input("What Is 8 x 4: ")if not math.isdigit():print("It's not number")elif math == "32":print("You Got The Question Correct")breakelse:print("Sorry You Got The Question Wrong Try Again")
This question already has answers here:How can I parse (read) and use JSON in Python?(5 answers)Closed 10 years ago.Please help me to parse this json in python.{ "IT" : [ { "firstName…
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 last month.Improve …
class LoginScreen(Screen):def __init__(self,**kwargs):super(LoginScreen, self).__init__(**kwargs)print self,self.parent.currentclass AppScreenManager(ScreenManager):pass#Base Class
class AppBaseClass(A…
This question already has answers here:Submitting to a web form using python(3 answers)Closed 8 years ago.The community reviewed whether to reopen this question 9 months ago and left it closed:Original…
I have built a simple blog app with Django and I have had some issue with NoReverseMatch. Here are my problem screenshots: https://prnt.sc/imqx70
https://prnt.sc/imqwptHere is my code on Github: https:…
First question: How do I make python minimize chrome? Second question: When getting to the end page using the next button how do I tell python to go on.. and not give me an error?driver.get("htt…
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 9 years ago.Improve…
I have a problem with printing my output from muscle aligning in python. My code is:from Bio.Align.Applications import MuscleCommandline
from StringIO import StringIO
from Bio import AlignIOdef align_v…
This is my python code for printing an absolute number. My function is returning type None. I am not getting what I have done wrong. Please help me. def n(num):if num<0:return (num*-1)no = input(&qu…
I am trying this code but it does not return total count for zero[x][y], in this case it should return 5 but all it displays 255 five time.
THIS CODE IS FOR CONNECTED COMPONENTS AND ZERO IS ONE COMPONE…