sum of the will have an orthogonal triangle input from a file and you need to find the max numbers according to given rules below; 1. You will start from the top and move downwards to an adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as possible. 5. You have to treat the input as pyramid. 215 193 124 117 237 442 218 935 347 235 320 804 522 417 345

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

BY USING PYTHON 

You will have an orthogonal triangle input from a file and you need to find the maximum sum of the
numbers according to given rules below; 1. You will start from the top and move downwards to an
adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can
only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as
possible. 5. You have to treat the input as pyramid.
215
193 124
117 237 442
218 935 347 235
320 804 522 417 345
229 601 723 835 133 124
248 202 277 433 207 263 257
359 464 504 528 516 716 871 182
461 441 426 656 863 560 380 171 923
381 348 573 533 447 632 387 176 975 449
223 711 445 645 245 543 931 532 937 541 444
330 131 333 928 377 733 017 778 839 168 197 197
131 171 522 137 217 224 291 413 528 520 227 229 928
223 626 034 683 839 053 627 310 713 999 629 817 410 121
924 622 911 233 325 139 721 218 253 223 107 233 230 124 233
1. You will start from the top and move downwards to an adjacent number as in below.
2. You are only allowed to walk downwards and diagonally.
3. You can only walk over NON PRIME NUMBERS.
4. You have to reach at the end of the pyramid as much as possible.
5. You have to treat the input as pyramid.
By using these numbers and rules, find the maximum sum and numbers which you use.
Transcribed Image Text:You will have an orthogonal triangle input from a file and you need to find the maximum sum of the numbers according to given rules below; 1. You will start from the top and move downwards to an adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as possible. 5. You have to treat the input as pyramid. 215 193 124 117 237 442 218 935 347 235 320 804 522 417 345 229 601 723 835 133 124 248 202 277 433 207 263 257 359 464 504 528 516 716 871 182 461 441 426 656 863 560 380 171 923 381 348 573 533 447 632 387 176 975 449 223 711 445 645 245 543 931 532 937 541 444 330 131 333 928 377 733 017 778 839 168 197 197 131 171 522 137 217 224 291 413 528 520 227 229 928 223 626 034 683 839 053 627 310 713 999 629 817 410 121 924 622 911 233 325 139 721 218 253 223 107 233 230 124 233 1. You will start from the top and move downwards to an adjacent number as in below. 2. You are only allowed to walk downwards and diagonally. 3. You can only walk over NON PRIME NUMBERS. 4. You have to reach at the end of the pyramid as much as possible. 5. You have to treat the input as pyramid. By using these numbers and rules, find the maximum sum and numbers which you use.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education