Objectives By completing this a at you are demonstrating your ability to: • Decompose problems to create new solutions • Use variables and expressions to store and manipulate data • Use console input to take in data from a user • Create console output to report data to users Call functions Comment your code appropriately t requirements You are not allowed to use conditional statements, relational operators, and logical operators. You must solve this problem using arithmetic expressions. . You can make use of built-in Python functions. • The code must be properly commented, it will carry marks. Introduction Amxn LEGO baseplate is a collection of interconnected cells in a grid, where m is the number of rows and is the number of columns (m,n22). A baseplate has raised studs on the top. The classic LEGO bricks have raised studs on the top with tubes underneath to lock onto studs from other bricks or the baseplate. Though the LEGO bricks come in different sizes, in this assignment, we assume that all bricks have the same size. They will always have two rows (length is two). The number of columns (width) could be any number 21. The bricks are placed in a horizontal fashion i.e. a row must be full before moving to the next row. Also, a level should be full before a brick is placed on the next level (on top of the lower-level bricks) 2 Figure 1: A LEGO baseplate (Credit: LEGO) Figure 2: LEGO bricks (Credit: LEGO). Problem 1 Write a program in Python that performs the following tasks in order (sample output is shown in fig 3,4,5) 1. Takes the number of rows 'm' of the baseplate from the user 2. Takes the number of columns 'n' of the baseplate from the user. 3. Takes the number of columns 'y' of the brick from the user. 4. Prints the number of bricks that can be fixed on a given baseplate. In addition to the assignme requirements mentioned on page 1. you are not allowed to use Integer division (//). Enter the number of rows 'n' on the baseplate:5 Enter the number of cols 'n' on the baseplate:5 Enter the number of cols "y" on the brick:6 The maximum tiles that can be fixed on a 55 baseplate are: 0 Figure 3: Problem 1-sample run 1.
Objectives By completing this a at you are demonstrating your ability to: • Decompose problems to create new solutions • Use variables and expressions to store and manipulate data • Use console input to take in data from a user • Create console output to report data to users Call functions Comment your code appropriately t requirements You are not allowed to use conditional statements, relational operators, and logical operators. You must solve this problem using arithmetic expressions. . You can make use of built-in Python functions. • The code must be properly commented, it will carry marks. Introduction Amxn LEGO baseplate is a collection of interconnected cells in a grid, where m is the number of rows and is the number of columns (m,n22). A baseplate has raised studs on the top. The classic LEGO bricks have raised studs on the top with tubes underneath to lock onto studs from other bricks or the baseplate. Though the LEGO bricks come in different sizes, in this assignment, we assume that all bricks have the same size. They will always have two rows (length is two). The number of columns (width) could be any number 21. The bricks are placed in a horizontal fashion i.e. a row must be full before moving to the next row. Also, a level should be full before a brick is placed on the next level (on top of the lower-level bricks) 2 Figure 1: A LEGO baseplate (Credit: LEGO) Figure 2: LEGO bricks (Credit: LEGO). Problem 1 Write a program in Python that performs the following tasks in order (sample output is shown in fig 3,4,5) 1. Takes the number of rows 'm' of the baseplate from the user 2. Takes the number of columns 'n' of the baseplate from the user. 3. Takes the number of columns 'y' of the brick from the user. 4. Prints the number of bricks that can be fixed on a given baseplate. In addition to the assignme requirements mentioned on page 1. you are not allowed to use Integer division (//). Enter the number of rows 'n' on the baseplate:5 Enter the number of cols 'n' on the baseplate:5 Enter the number of cols "y" on the brick:6 The maximum tiles that can be fixed on a 55 baseplate are: 0 Figure 3: Problem 1-sample run 1.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY