Write a program that reads in two integers and determines and prints whether the first is a multiple of the second. (Hint: Use the modulus operator.)
What will be an ideal response?
```
# Determines if the first input is a multiple of the second input.
number1 = raw_input( "Enter possible multiple: " )
number1 = int( number1 )
number2 = raw_input( "Enter integer: " )
number2 = int( number2 )
if number1 % number2 == 0:
print "%d is a multiple of %d" % ( number1, number2 )
if number1 % number2 != 0:
print "%d is not a multiple of %d" % ( number1, number2 )
```
You might also like to view...
Which is NOT a requirement for an ideal chair for the workplace?
A) Lumbar support that fits the curve of your back B) Support for the legs without pressure on the back of the knees C) Tilting seat back D) Allows your feet to be flat on the ground
Match the following methods of connection with their description:
I. infrared II. twisted pair III. coaxial cable IV. wireless V. fiber optic A. copper wires that are insulated and twisted around each other inside insulation B. copper wire surrounded by a layer of insulation C. radio signals D. light that is invisible due to its longer wavelength E. thin, flexible, glass fibers inside of a protective covering
Since Windows Vista uses partial matching by default when you execute a search, you can not search by whole words only
Indicate whether the statement is true or false
In this chapter, you learned about the importance of testing. Design a generic test plan that describes the testing for an imaginary system.
What will be an ideal response?