q: Write a program that prompts the user to enter two integers, one per prompt. The program should then display the result of dividing the first number by the second number, using integer division so that the answer is an integer quotient, and a remainder.

Output:
Enter an integer >17
enter an integer >3
17 divided by 3 is 5 remainder 2

My code:
a = int(input('Enter an integer >')
b = int(input('Enter an integer >')
print('17 divided by 3 is', str(a//b), 'remainder', str(a%b))

When I run it, it gives the same output, but it is wrong on my quiz assignment. please advise.

Please add a tag indicating which computer language this is.

I'll take it as Python but missing the right parens on a few lines.
You didn't supply what output was expected so I'll pause here.

For starters, because you hard coded that part of the print statement, no matter what input you give it you will always print out 17 and 3.

commented: Seems like what they claim voting machine coders would write? +0

Are you asking us to do your homework for you? Won't happen my friend.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.