python3 user input, one number divisble by another [on hold]











up vote
-4
down vote

favorite












trying to learn python and practice what i am learning. this is a solution practice i found online:
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.



I have tried different variations of the if statment and definition parameter. I cant get the output to print "Num is the winner". The if statement always defaults to the else/false print statement. I could use a regular if statement but i wanted to practice using definitions.



def Num_vs_Check(The_winner_is):

if The_winner_is == 0:
return True

else:
return False

print("This is a friendly competition")
num = int(input(""))
check = int(input(""))

The_winner_is = (num % check)

if The_winner_is == True:
print(The_winner_is, "Num is the winner")

else:
print(The_winner_is, "Sorry num it's not your day, check wins")









share|improve this question







New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher 1 hour ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • @Thomas Ward...thanks for the input.
    – AlphaCoding2018
    8 hours ago















up vote
-4
down vote

favorite












trying to learn python and practice what i am learning. this is a solution practice i found online:
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.



I have tried different variations of the if statment and definition parameter. I cant get the output to print "Num is the winner". The if statement always defaults to the else/false print statement. I could use a regular if statement but i wanted to practice using definitions.



def Num_vs_Check(The_winner_is):

if The_winner_is == 0:
return True

else:
return False

print("This is a friendly competition")
num = int(input(""))
check = int(input(""))

The_winner_is = (num % check)

if The_winner_is == True:
print(The_winner_is, "Num is the winner")

else:
print(The_winner_is, "Sorry num it's not your day, check wins")









share|improve this question







New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as off-topic by 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher 1 hour ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher

If this question can be reworded to fit the rules in the help center, please edit the question.









  • 3




    Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • @Thomas Ward...thanks for the input.
    – AlphaCoding2018
    8 hours ago













up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











trying to learn python and practice what i am learning. this is a solution practice i found online:
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.



I have tried different variations of the if statment and definition parameter. I cant get the output to print "Num is the winner". The if statement always defaults to the else/false print statement. I could use a regular if statement but i wanted to practice using definitions.



def Num_vs_Check(The_winner_is):

if The_winner_is == 0:
return True

else:
return False

print("This is a friendly competition")
num = int(input(""))
check = int(input(""))

The_winner_is = (num % check)

if The_winner_is == True:
print(The_winner_is, "Num is the winner")

else:
print(The_winner_is, "Sorry num it's not your day, check wins")









share|improve this question







New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











trying to learn python and practice what i am learning. this is a solution practice i found online:
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.



I have tried different variations of the if statment and definition parameter. I cant get the output to print "Num is the winner". The if statement always defaults to the else/false print statement. I could use a regular if statement but i wanted to practice using definitions.



def Num_vs_Check(The_winner_is):

if The_winner_is == 0:
return True

else:
return False

print("This is a friendly competition")
num = int(input(""))
check = int(input(""))

The_winner_is = (num % check)

if The_winner_is == True:
print(The_winner_is, "Num is the winner")

else:
print(The_winner_is, "Sorry num it's not your day, check wins")






python-3.x






share|improve this question







New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 11 hours ago









AlphaCoding2018

1




1




New contributor




AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






AlphaCoding2018 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher 1 hour ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher 1 hour ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – 200_success, πάντα ῥεῖ, Sᴀᴍ Onᴇᴌᴀ, alecxe, Heslacher

If this question can be reworded to fit the rules in the help center, please edit the question.








  • 3




    Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • @Thomas Ward...thanks for the input.
    – AlphaCoding2018
    8 hours ago














  • 3




    Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
    – Thomas Ward
    11 hours ago










  • @Thomas Ward...thanks for the input.
    – AlphaCoding2018
    8 hours ago








3




3




Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
– Thomas Ward
11 hours ago




Code not working properly belongs on Stack Overflow, not Code Review. You indicate you can't get your code to output something, so that indicates that your code is not correct, and that needs Stack Overflow, not Code Review.
– Thomas Ward
11 hours ago












I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
– Thomas Ward
11 hours ago




I don't think that % does what you think it does, nor does numerical -> boolean checks do what you think it does. However, this is again an issue for StackOverflow, not Code Review.
– Thomas Ward
11 hours ago












@Thomas Ward...thanks for the input.
– AlphaCoding2018
8 hours ago




@Thomas Ward...thanks for the input.
– AlphaCoding2018
8 hours ago















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'