Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is the previous code that should be used . Suppose the architect specifies a pattern with black, gray, and white tiles, like this: Again,

image text in transcribed
image text in transcribed
this is the previous code that should be used
. Suppose the architect specifies a pattern with black, gray, and white tiles, like this: Again, the first and last tile should be black. Solve this problem by modifying the pseudo code of the previous exercise. = #input total width and tile width Total_Width int(input("Enter total width: ")) Tile_Width = int(input("Enter tile width: ")) #calculate results widthWithoutBlacktile = Total_Width - Tile_Width white_black_tile_pairs = Total_Width // (2*Tile_Width) Number_of_Tiles = 1+ (2*white_black_tile pairs) Length_of_used_tiles = Number_of_Tiles * 2 Total_gap = Total_width = Length_of_used_tiles Gap_at_each_end = Total_gap/2 #print the calculated results print("Width without Black Tile",widthWithoutBlacktile) print("Number of white black tile pairs",white_black_tile_pairs) print("Number of tiles", Number_of_Tiles) print("Length of used tiles" , Length_of_used_tiles) print("Total gap", Total_gap) print("Gap at each end ", Gap_at_each_end)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

2. How do they influence my actions?

Answered: 1 week ago