6 nails, 4 glass pieces and 2 brass handles are required for one window. There are 'N' no. Of windows in a room and 'M' such room in my house , Write a program to calculate total no. Of nails,glasspieces and brass handles will be required
# windows.py
nails_per_window = 6
glasses_per_window = 4
handles_per_window = 2
# number of windows per room
N = int(input("Number of windows per room "))
# number of rooms
M = int(input("Number of rooms "))
windows = N * M
nails = nails_per_window * windows
glasspieces = glasses_per_window * windows
brass_handles = handles_per_window * windows
print(f'{nails} nails, {glasspieces} glass pieces and {brass_handles}'
' brass handles are required.')
Comments
Leave a comment