Description
I am facing this problem while reading an XLSX files having 40,000 plus rows and 7 columns having 5MB+ file size with PHPExcel.
The error description is given here:
Quote:
Can you please suggest me a solution to this problem?Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in ..... |
Thanking you in anticipation.
Best Regards,
Rao Rafique.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in
Fatal Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in Thanks
Completion Status:
100%

Studypool
4.7
Indeed
4.5

Sitejabber
4.4
24/7 Study Help
Stuck on a study question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
9 pages

Brand Website
This project entails building an alias website for Apple Inc., which primarily features the main product that the company ...
Brand Website
This project entails building an alias website for Apple Inc., which primarily features the main product that the company produces for its consumers. ...

CS 515 UNH Lab 3 C++ Queue Debug & Stack Implementation Project
I need to complete stack.cpp through stack.h. Here is a world document indicating how it needs to be done.
CS 515 UNH Lab 3 C++ Queue Debug & Stack Implementation Project
I need to complete stack.cpp through stack.h. Here is a world document indicating how it needs to be done.

Need Help with paper due by Friday noon, my draft is attached
ne of your assignments in this course is to complete a research paper. This assignment is designed to help you further you ...
Need Help with paper due by Friday noon, my draft is attached
ne of your assignments in this course is to complete a research paper. This assignment is designed to help you further your knowledge in a subject of interest to you, while being exposed to other students' research. In the information systems field, the technology changes rapidly, and people working in this field must develop their ability to get up to speed quickly. This assignment will help you practice that skill, while allowing you to learn more about a topic of interest. This assignment involves researching a topic, creating a brief written presentation, and leading a discussion for the rest of the class.The following topics are recommended. If you are interested in doing a topic not listed here, please message or email me before the deadline for selecting topics. Remember, the material must be your original work done specifically for this course.
Compare Procedural and Object Oriented Programming
"There is a certain amount of ranting on both sides of the issue, and slogans such as "Objects are bad!" or "Objects are good!" are sometimes heard?do(es) not attempt to decide between the two approaches and come up with a single "best practice", but? explore the advantages and disadvantages of each." Robert Peake, ZEND software.
Compare the Java and .NET programming languages
"The future of software development is now expected to be a near 50-50 split between Java and .Net. When making a decision on which technology to bank on, you should really research what types of companies use which technology, and which fits into your career aspirations. Java and .Net overlap in a lot of markets and inevitably each will form definitive niches that will be hard to break until newer model-based programming technologies take over." Payton Byrd, Java vs .Net - The Professional Software Developer's Survival Guide
Describe and Discuss Service Oriented Architectures
"Service-oriented architecture (SOA) is a hot topic in enterprise computing because many IT professionals see the potential of an SOA -- especially a web services-based SOA -- in dramatically speeding up the application development process. They also see it as a way to build applications and systems that are more adaptable, and in doing so, they see IT becoming more agile in responding to changing business needs." Ed Ort, Sun Developer Network
Describe and Discuss Software Design Patterns
"A software design pattern describes a family of solutions to a software design problem?The purpose of design patterns is to capture software design know-how and make it reusable. Design patterns can improve the structure of software, simplify maintenance, and help avoid architectural drift. Design patterns also improve communication among software developers and empower less experienced personnel to produce high-quality designs." Walter F. Tichy, Essential Software Design Patterns
Describe and Discuss Extreme Programming (XP)
"Extreme Programming is a discipline of software development based on values of simplicity, communication, feedback, and courage. It works by bringing the whole team together in the presence of simple practices, with enough feedback to enable the team to see where they are and to tune the practices to their unique situation." Ron Jeffries, XP Magazine
Describe and Discuss Integrated Development Environments
"An integrated development environment (IDE) (also known as an integrated design environment and integrated debugging environment) is computer software to help computer programmers develop software.They normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and (usually) a debugger. Sometimes a version control system and various tools to simplify the construction of a GUI are integrated as well. Many modern IDEs also integrate a class browser, an object inspector and a class hierarchy diagram, for use with object oriented software development. Although some multiple-language IDEs are in use, such as the Eclipse IDE or Microsoft Visual Studio, typically an IDE is devoted to a specific programming language, as in the Visual Basic IDE." Wikipedia

Concord University Programming & Basic Arithmetic Functions Lab Report
directions provided!# these are the basic arithmetic functions you will be using for this challenge
# function: add
...
Concord University Programming & Basic Arithmetic Functions Lab Report
directions provided!# these are the basic arithmetic functions you will be using for this challenge
# function: add
# input: two integers/floats
# processing: adds the two supplied values
# output: returns the sum (integer/float)
def add(a,b):
return a+b
# function: sub
# input: two integers/floats
# processing: subtracts the two supplied values
# output: returns the difference (integer/float)
def sub(a,b):
return a-b
# function: mult
# input: two integers/floats
# processing: multiplies the two supplied values
# output: returns the product (integer/float)
def mult(a,b):
return a*b
# function: sqrt
# input: one integer/float
# processing: computes the square root of the supplied value
# output: returns the square root (float)
def sqrt(a):
return a**0.5
# function: square
# input: one integer/float
# processing: raises the supplied integer/float to the 2nd power
# output: returns the square (integer/float)
def square(a):
return a**2
# these are the two points you will be using
# point 1
x1 = 0
y1 = 0
# point 2
x2 = 100
y2 = 100
# compute the distance between the two points above using the distance formula.
# you may ONLY use the functions above to do this - no math operators are allowed!
# your calculation must also be done on a single line.
distance = ______________________
print (distance) # answer should be 141.4213562373095
distance formula:
Part 2
Write two functions called <strong>'maximum'</strong> and <strong>'minimum'</strong> - these function should accept two arguments and <strong>return</strong> the larger/smaller of the two supplied values. For the purpose of this program you can always assume that the arguments being supplied are numeric.. Your program should work perfectly with the following code:a = 5
b = 10
c = 15
d = 20
ans1 = maximum(a,b)
ans2 = maximum(a,c)
ans3 = maximum(a,d)
print (ans1,ans2,ans3) # 10 15 20
ans4 = minimum(d,c)
ans5 = minimum(d,b)
ans6 = minimum(d,a)
print (ans4,ans5,ans6) # 15 10 5
ans7 = maximum( maximum(a,b), maximum(c,d) )
print ("The biggest is:", ans7)Challenge 3# write a function called '<strong>simple_sort_version1'</strong> that accepts two values. you can assume
# that your two values will always be the same data type (all ints, all floats or all strings).
# sort these two values in ascending order and <strong>return</strong> them in that order.
# you may use any function that you've written so far in this assignment if you'd like to (maximum, minimum, etc)
# your function should work perfectly with the following lines of code
a,b = simple_sort_version1(10,20)
print (a,b) # 10 20
a,b = simple_sort_version1(20,10)
print (a,b) # 10 20
a,b = simple_sort_version1(30,30)
print (a,b) # 30 30Challenge 4# next, write a new function called '<strong>simple_sort_version2</strong>' that accepts three values. you can assume
# that your three values will always be the same data type (all ints, all floats or all strings).
# sort these values in ascending order and <strong>return</strong> them.
# you may use any function that you've written so far in this assignment if you'd like to (simple_sort_version1, maximum, minimum, etc)
# your function should work perfectly with the following lines of code
a,b,c = simple_sort_version2(10,20,30)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(10,30,20)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(30,20,10)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(30,20,20)
print (a,b,c) # 20 20 30
Part 2aFor this step you are given three functions - go ahead and copy these functions into a new file called "digitalclock.py":# function: horizontal_line
# input: a width value (integer) and a single character (string)
# processing: generates a single horizontal line of the desired size
# output: returns the generated pattern (string)
def horizontal_line(width,char):
return width*char + "\n"
# function: vertical_line
# input: a shift value and a height value (both integers) and a single character (string)
# processing: generates a single vertical line of the desired height. the line is
# offset from the left side of the screen using the shift value
# output: returns the generated pattern (string)
def vertical_line(shift,height,char):
pattern = ""
for i in range(height):
pattern += shift*" " + char + "\n"
return pattern
# function: two_vertical_lines
# input: a width value and a height value (both integers) and a single character (string)
# processing: generates two vertical lines. the first line is along the left side of
# the screen. the second line is offset using the "width" value supplied
# output: returns the generated pattern (string)
def two_vertical_lines(width,height,char):
pattern = ""
for i in range(height):
pattern += char + " "*(width-2) + char + "\n"
return patternNext, create a file called 'LastName_FirstName_Assign6_part2.py' - make sure this file is in the same folder as your newly created 'digitalclock.py' file. Import your module then run the following code - you should be able to see a series of graphical patterns that match the output below:import digitalclock
print ("Horizontal line, width = 5:")
temp = digitalclock.horizontal_line(5, '*')
print (temp)
print ()
print ("Horizontal line, width = 10:")
temp = digitalclock.horizontal_line(10, '+')
print (temp)
print ()
print ("Horizontal line, width = 15:")
temp = digitalclock.horizontal_line(15, 'z')
print (temp)
print ()
print ("Vertical Line, shift=0; height=3:")
temp = digitalclock.vertical_line(0, 3, '!')
print (temp)
print ()
print ("Vertical Line, shift=3; height=3:")
temp = digitalclock.vertical_line(3, 3, '&')
print (temp)
print ()
print ("Vertical Line, shift=6; height=5:")
temp = digitalclock.vertical_line(6, 5, '$')
print (temp)
print ()
print ("Two Vertical Lines, width=3; height=3:")
temp = digitalclock.two_vertical_lines(3, 3, '^')
print (temp)
print ()
print ("Two Vertical Lines, width=4; height=5:")
temp = digitalclock.two_vertical_lines(4, 5, '@')
print (temp)
print ()
print ("Two Vertical Lines, width=5; height=2:")
temp = digitalclock.two_vertical_lines(5, 2, '#')
print (temp)
print ()Expected Output:Horizontal line, width = 5:
*****
Horizontal line, width = 10:
++++++++++
Horizontal line, width = 15:
zzzzzzzzzzzzzzz
Vertical Line, shift=0; height=3:
!
!
!
Vertical Line, shift=3; height=3:
&
&
&
Vertical Line, shift=6; height=5:
$
$
$
$
$
Two Vertical Lines, width=3; height=3:
^ ^
^ ^
^ ^
Two Vertical Lines, width=4; height=5:
@ @
@ @
@ @
@ @
@ @
Two Vertical Lines, width=5; height=2:
# #
# #
Part 2b
As you can see, you have three "primitive" functions for generating simple shapes (horizontal lines, vertical lines and parallel vertical lines). Your next task is to write 10 new functions that generate the digits 0-9 using your three line functions. These functions should be stored in your 'digitalclock.py' module. The goal here is to render the digits as they would appear on a digital display:
Each function should accept a "width" argument to control how wide the number should be as well as a single character. You can assume numbers will always be printed with a height of 5. For example, here is the function for the number 1:
# function: number_1
# input: a width value (integer) and a single character (string)
# processing: generates the number 1 as it would appear on a digital display
# using the supplied width value
# output: returns the generated pattern (string)
def number_1(width, character):
pattern = vertical_line(width-1, 5, character)
return patternAnd here's a sample program that calls the function a few times (test this in your main program, not in your module):
print ("Number 1, width=5: ")
temp = digitalclock.number_1(5, '*')
print(temp)
print()
print ("Number 1, width=10: ")
temp = digitalclock.number_1(10, '*')
print(temp)
print()
print ("Number 1, width=2: ")
temp = digitalclock.number_1(2, '*')
print(temp)
print()And here's the expected output:
Number 1, width=5:
*
*
*
*
*
Number 1, width=10:
*
*
*
*
*
Number 1, width=2:
*
*
*
*
*
Here's a sample program that prints all of the numbers (0-9).
temp = digitalclock.number_0(5, '*')
print(temp)
print()
temp = digitalclock.number_1(5, '*')
print(temp)
print()
temp = digitalclock.number_2(5, '*')
print(temp)
print()
temp = digitalclock.number_3(5, '*')
print(temp)
print()
temp = digitalclock.number_4(5, '*')
print(temp)
print()
temp = digitalclock.number_5(5, '*')
print(temp)
print()
temp = digitalclock.number_6(5, '*')
print(temp)
print()
temp = digitalclock.number_7(5, '*')
print(temp)
print()
temp = digitalclock.number_8(5, '*')
print(temp)
print()
temp = digitalclock.number_9(5, '*')
print(temp)
print()And here's the expected output:
*****
* *
* *
* *
*****
*
*
*
*
*
*****
*
*****
*
*****
*****
*
*****
*
*****
* *
* *
*****
*
*
*****
*
*****
*
*****
*****
*
*****
* *
*****
*****
*
*
*
*
*****
* *
*****
* *
*****
*****
* *
*****
*
*
Part 2c
Write a function called 'print_number' that prints out any desired number to the screen. This function should also be placed in your 'digitalclock.py' module. Here's the IPO for this function:
# function: print_number
# input: a number to print (integer), a width value (integer) and a single character (string)
# processing: prints the desired number to the screen using the supplied width value
# output: does not return anythingAnd here's some sample code that you can use to test your function:
digitalclock.print_number(0, 5, '*')
digitalclock.print_number(1, 6, '*')
digitalclock.print_number(2, 7, '*')
digitalclock.print_number(3, 8, '*')
digitalclock.print_number(4, 9, '*')
digitalclock.print_number(5, 10, '*')
digitalclock.print_number(6, 11, '*')
digitalclock.print_number(7, 12, '*')
digitalclock.print_number(8, 13, '*')
digitalclock.print_number(9, 14, '*')And here's the expected output:
*****
* *
* *
* *
*****
*
*
*
*
*
*******
*
*******
*
*******
********
*
********
*
********
* *
* *
*********
*
*
**********
*
**********
*
**********
***********
*
***********
* *
***********
************
*
*
*
*
*************
* *
*************
* *
*************
**************
* *
**************
*
*
Part 2d
Write two new functions that simulate the addition and subtraction operators. Each of these functions should accept a width value as an argument (integer) and a single character (string) -- the function should then return the generated pattern. You can assume the operators will always be 5 units high. Again, these functions should be placed in your 'digitalclock.py' module. Here's some sample code:
temp = digitalclock.plus(5, '*')
print(temp)
print()
temp = digitalclock.minus(5, '*')
print(temp)Which will generate ...
*
*
*****
*
*
*****
Note that your "plus" sign may look odd if it is rendered using an even size value - for example:
# rendered using a width of 6
*
*
******
*
*
To fix this you should double up the vertical line in the center for even sizes, like this:
# rendered using a width of 6
**
**
******
**
**
Part 2e
Write a function called "check_answer" which will determine if a given addition or subtraction problem was solved correctly. This function should be inside of your "digitalclock.py" module. Here's the IPO notation for the function:
# function: check_answer
# input: two numbers (number1 & number2, both integers); an answer (an integer)
# and an operator (+ or -, expressed as a String)
# processing: determines if the supplied expression is correct. for example, if the operator
# is "+", number1 = 1, number2 = 2 and answer = 3 then the expression is correct
# (1 + 2 = 3).
# output: returns True if the expression is correct, False if it is not correct
Here's a sample program that you can use to test your function:
answer1 = digitalclock.check_answer(1, 2, 3, "+")
print (answer1)
answer2 = digitalclock.check_answer(1, 2, -1, "-")
print (answer2)
answer3 = digitalclock.check_answer(9, 5, 3, "+")
print (answer3)
answer4 = digitalclock.check_answer(8, 2, 4, "-")
print (answer4)And here's the expected output:
True
True
False
FalsePart 2f
Finally, put everything together and write a program that lets the user practice a series of random addition and subtraction problems. Begin by asking the user for a number of problems (only accept positive values) and a size for their numbers (only accept numbers between 5 and 10). Also prompt them for a single character to be used to generate their patterns - only accept single character strings (i.e. 'a' is OK, but 'apple' is not). The generate a series of random addition and subtraction problems - display the numbers to the user with your digital display functions. Then prompt the user for an answer and check the answer using your check_answer function. Your program should also keep track of how many correct questions the user answered during their game. Here's a sample running of the program:
How many problems would you like to attempt? -5
Invalid number, try again
How many problems would you like to attempt? 5
How wide do you want your digits to be? 5-10: 3
Invalid width, try again
How wide do you want your digits to be? 5-10: 5
What character would you like to use? foo
String too long, try again
What character would you like to use? *
Here we go!
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*
*
*
*
*
= 4
Correct!
What is .....
*****
*
*****
*
*****
*****
*****
*
*
*
*
= -5
Correct!
What is .....
*
*
*
*
*
*****
*****
*
*****
*
*****
= 0
Sorry, that's not correct.
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*
*
*
*
*
= 3
Correct!
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 4
Correct!
You got 4 out of 5 correct!
Part 3: Extra Credit
You can add any of the following features to your game for extra credit. These are optional features and are not required to receive full credit on the assignment!:
Add multiplication problems to the game. You will have to update your check_answer function as well as add a new operator function to display the multiplication sign. Note that the visual representation of your multiplication sign does not need to be "perfect" - try and come up with a function that somewhat looks like a "X" or "*" character.
Add division problems to the game. You will have to update your check_answer function as well as add a new operator function to display the division sign. For division problems you need to ensure that the result of the problem you present is a whole number. For example, the following would be valid division problems for this game:2 / 2 = 1
4 / 2 = 2
9 / 3 = 3However, the following would NOT be valid since the answers are not whole numbers:5 / 2 = 2.5
9 / 8 = 1.125
8 / 3 = 2.6666666 (repeating)Ensure that the division problems you supply to your players always yield a whole number result. You may need to generate a few different numbers in order to do this (hint: while loop!).
Add in a "drill" mode to your game. If this mode is activated by the user they will be re-prompted to solve a problem that they got incorrect. Points are turned off in "drill" mode since the user can attempt a problem multiple times. Here's an example:How many problems would you like to attempt? 2
How wide do you want your digits to be? 5-10: 5
Would you like to activate 'drill' mode? yes or no: yes
What is .....
*****
* *
* *
* *
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 1
Sorry, that's not correct.
= 2
Sorry, that's not correct.
= 3
Correct!
What is .....
*****
* *
*****
* *
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 13
Correct!
Thanks for playing!
Keep track of statistics by problem type. For example, at the end of your program you could display a display like the following that summarizes the performance of the player:Total addition problems presented: 5
Correct addition problems: 4 (80.0%)
Total subtraction problems presented: 4
Correct subtraction problems: 3 (75.0%)
No multiplication problems presented
Total division problems presented: 1
Correct division problems: 0 (0.0%)If you implemented "drill" mode you should modify your statistics display to include information about how many "extra" attempts it took so solve those problems. For example:Total addition problems presented: 5
# of extra attempts needed: 0 (perfect!)
Total subtraction problems presented: 4
# of extra attempts needed: 1
No multiplication problems presented
Total division problems presented: 1
# of extra attempts needed: 5

FIN 383 SUSS Programming a Python Script Portafolio
1. Instruction as provided in the question paper. 2. All documentation and assumptions must be indicated and made within t ...
FIN 383 SUSS Programming a Python Script Portafolio
1. Instruction as provided in the question paper. 2. All documentation and assumptions must be indicated and made within the ipynb file using either Markdown or inline comments.3. Good programming habits to ensure your code is readable4. Submit a Jupyter Notebook (ipynb) for this assignment5. Financial knowledge and python skill required6. Data will need some processing7. Errata provided for the Main ECA correction8. No Cash remaining, stock can be fractional purchase9. Portfolio drifting. To main the percentage allocation. Sell and purchase of stock is require.Example: Allocation Stock A is 60% , Stock B is 30% , Stock C is 10%Initial Price Stock A is $60 , Stock B is $30 , Stock C is $10Later Date Price Stock A is $100 , Stock B is $30 , Stock C is $10 = Total Market value is $140Therefore, allocation for Stock A is 100/140 Not 60% as required and have to sell and vice versa
Similar Content
DePaul University ER Diagram SQL Questions
Hello, i need help answering these four questions attached. Please follow the instructions. ...
project is to determine the convergence of such algorithms through a simulator based on actors written in Erlang
As described in class Gossip type algorithms can be used both for group communication and for aggregate computation. The g...
Ways to incorporate exceptions that will have a program terminate in an elegant fashion?, assignment help
Ways to incorporate exceptions that will have a program terminate in an elegant fashion?...
Capella University AWS Cloud Computing Project
Project 1 Requirements
For project 1, we'll use some of the AWS services we've learned in the class so far to create
a rea...
Caeser Cipher Program
CS 285 – Group Project (10 marks)
Due Date: (25-11-2021)
Group Project (2-4 members)
ï‚·
ï‚·
ï‚·
Submit the java code ...
Java Instance Variables and Class Variables Worksheet
After answering this assignment you will be able to:
(a) Distinguish between instance variables and class variables
(b) Di...
C Assignment
This program includes a dynamic array for entering integer values. The code has two functions. The first function called â...
Explanation Of Program Plus Screenshots
They will choose their names from the Listbox and their names will be tied to the picture as shown The student will recogn...
Case Study 2 Collaboration Systems At Isuzu Australia Limited
The main reason(s) that prompted Isuzu Australia Limited (IAL) to use collaboration Initially, Isuzu Australia Limited (IA...
Related Tags
Book Guides

Get 24/7
Study help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
9 pages

Brand Website
This project entails building an alias website for Apple Inc., which primarily features the main product that the company ...
Brand Website
This project entails building an alias website for Apple Inc., which primarily features the main product that the company produces for its consumers. ...

CS 515 UNH Lab 3 C++ Queue Debug & Stack Implementation Project
I need to complete stack.cpp through stack.h. Here is a world document indicating how it needs to be done.
CS 515 UNH Lab 3 C++ Queue Debug & Stack Implementation Project
I need to complete stack.cpp through stack.h. Here is a world document indicating how it needs to be done.

Need Help with paper due by Friday noon, my draft is attached
ne of your assignments in this course is to complete a research paper. This assignment is designed to help you further you ...
Need Help with paper due by Friday noon, my draft is attached
ne of your assignments in this course is to complete a research paper. This assignment is designed to help you further your knowledge in a subject of interest to you, while being exposed to other students' research. In the information systems field, the technology changes rapidly, and people working in this field must develop their ability to get up to speed quickly. This assignment will help you practice that skill, while allowing you to learn more about a topic of interest. This assignment involves researching a topic, creating a brief written presentation, and leading a discussion for the rest of the class.The following topics are recommended. If you are interested in doing a topic not listed here, please message or email me before the deadline for selecting topics. Remember, the material must be your original work done specifically for this course.
Compare Procedural and Object Oriented Programming
"There is a certain amount of ranting on both sides of the issue, and slogans such as "Objects are bad!" or "Objects are good!" are sometimes heard?do(es) not attempt to decide between the two approaches and come up with a single "best practice", but? explore the advantages and disadvantages of each." Robert Peake, ZEND software.
Compare the Java and .NET programming languages
"The future of software development is now expected to be a near 50-50 split between Java and .Net. When making a decision on which technology to bank on, you should really research what types of companies use which technology, and which fits into your career aspirations. Java and .Net overlap in a lot of markets and inevitably each will form definitive niches that will be hard to break until newer model-based programming technologies take over." Payton Byrd, Java vs .Net - The Professional Software Developer's Survival Guide
Describe and Discuss Service Oriented Architectures
"Service-oriented architecture (SOA) is a hot topic in enterprise computing because many IT professionals see the potential of an SOA -- especially a web services-based SOA -- in dramatically speeding up the application development process. They also see it as a way to build applications and systems that are more adaptable, and in doing so, they see IT becoming more agile in responding to changing business needs." Ed Ort, Sun Developer Network
Describe and Discuss Software Design Patterns
"A software design pattern describes a family of solutions to a software design problem?The purpose of design patterns is to capture software design know-how and make it reusable. Design patterns can improve the structure of software, simplify maintenance, and help avoid architectural drift. Design patterns also improve communication among software developers and empower less experienced personnel to produce high-quality designs." Walter F. Tichy, Essential Software Design Patterns
Describe and Discuss Extreme Programming (XP)
"Extreme Programming is a discipline of software development based on values of simplicity, communication, feedback, and courage. It works by bringing the whole team together in the presence of simple practices, with enough feedback to enable the team to see where they are and to tune the practices to their unique situation." Ron Jeffries, XP Magazine
Describe and Discuss Integrated Development Environments
"An integrated development environment (IDE) (also known as an integrated design environment and integrated debugging environment) is computer software to help computer programmers develop software.They normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and (usually) a debugger. Sometimes a version control system and various tools to simplify the construction of a GUI are integrated as well. Many modern IDEs also integrate a class browser, an object inspector and a class hierarchy diagram, for use with object oriented software development. Although some multiple-language IDEs are in use, such as the Eclipse IDE or Microsoft Visual Studio, typically an IDE is devoted to a specific programming language, as in the Visual Basic IDE." Wikipedia

Concord University Programming & Basic Arithmetic Functions Lab Report
directions provided!# these are the basic arithmetic functions you will be using for this challenge
# function: add
...
Concord University Programming & Basic Arithmetic Functions Lab Report
directions provided!# these are the basic arithmetic functions you will be using for this challenge
# function: add
# input: two integers/floats
# processing: adds the two supplied values
# output: returns the sum (integer/float)
def add(a,b):
return a+b
# function: sub
# input: two integers/floats
# processing: subtracts the two supplied values
# output: returns the difference (integer/float)
def sub(a,b):
return a-b
# function: mult
# input: two integers/floats
# processing: multiplies the two supplied values
# output: returns the product (integer/float)
def mult(a,b):
return a*b
# function: sqrt
# input: one integer/float
# processing: computes the square root of the supplied value
# output: returns the square root (float)
def sqrt(a):
return a**0.5
# function: square
# input: one integer/float
# processing: raises the supplied integer/float to the 2nd power
# output: returns the square (integer/float)
def square(a):
return a**2
# these are the two points you will be using
# point 1
x1 = 0
y1 = 0
# point 2
x2 = 100
y2 = 100
# compute the distance between the two points above using the distance formula.
# you may ONLY use the functions above to do this - no math operators are allowed!
# your calculation must also be done on a single line.
distance = ______________________
print (distance) # answer should be 141.4213562373095
distance formula:
Part 2
Write two functions called <strong>'maximum'</strong> and <strong>'minimum'</strong> - these function should accept two arguments and <strong>return</strong> the larger/smaller of the two supplied values. For the purpose of this program you can always assume that the arguments being supplied are numeric.. Your program should work perfectly with the following code:a = 5
b = 10
c = 15
d = 20
ans1 = maximum(a,b)
ans2 = maximum(a,c)
ans3 = maximum(a,d)
print (ans1,ans2,ans3) # 10 15 20
ans4 = minimum(d,c)
ans5 = minimum(d,b)
ans6 = minimum(d,a)
print (ans4,ans5,ans6) # 15 10 5
ans7 = maximum( maximum(a,b), maximum(c,d) )
print ("The biggest is:", ans7)Challenge 3# write a function called '<strong>simple_sort_version1'</strong> that accepts two values. you can assume
# that your two values will always be the same data type (all ints, all floats or all strings).
# sort these two values in ascending order and <strong>return</strong> them in that order.
# you may use any function that you've written so far in this assignment if you'd like to (maximum, minimum, etc)
# your function should work perfectly with the following lines of code
a,b = simple_sort_version1(10,20)
print (a,b) # 10 20
a,b = simple_sort_version1(20,10)
print (a,b) # 10 20
a,b = simple_sort_version1(30,30)
print (a,b) # 30 30Challenge 4# next, write a new function called '<strong>simple_sort_version2</strong>' that accepts three values. you can assume
# that your three values will always be the same data type (all ints, all floats or all strings).
# sort these values in ascending order and <strong>return</strong> them.
# you may use any function that you've written so far in this assignment if you'd like to (simple_sort_version1, maximum, minimum, etc)
# your function should work perfectly with the following lines of code
a,b,c = simple_sort_version2(10,20,30)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(10,30,20)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(30,20,10)
print (a,b,c) # 10 20 30
a,b,c = simple_sort_version2(30,20,20)
print (a,b,c) # 20 20 30
Part 2aFor this step you are given three functions - go ahead and copy these functions into a new file called "digitalclock.py":# function: horizontal_line
# input: a width value (integer) and a single character (string)
# processing: generates a single horizontal line of the desired size
# output: returns the generated pattern (string)
def horizontal_line(width,char):
return width*char + "\n"
# function: vertical_line
# input: a shift value and a height value (both integers) and a single character (string)
# processing: generates a single vertical line of the desired height. the line is
# offset from the left side of the screen using the shift value
# output: returns the generated pattern (string)
def vertical_line(shift,height,char):
pattern = ""
for i in range(height):
pattern += shift*" " + char + "\n"
return pattern
# function: two_vertical_lines
# input: a width value and a height value (both integers) and a single character (string)
# processing: generates two vertical lines. the first line is along the left side of
# the screen. the second line is offset using the "width" value supplied
# output: returns the generated pattern (string)
def two_vertical_lines(width,height,char):
pattern = ""
for i in range(height):
pattern += char + " "*(width-2) + char + "\n"
return patternNext, create a file called 'LastName_FirstName_Assign6_part2.py' - make sure this file is in the same folder as your newly created 'digitalclock.py' file. Import your module then run the following code - you should be able to see a series of graphical patterns that match the output below:import digitalclock
print ("Horizontal line, width = 5:")
temp = digitalclock.horizontal_line(5, '*')
print (temp)
print ()
print ("Horizontal line, width = 10:")
temp = digitalclock.horizontal_line(10, '+')
print (temp)
print ()
print ("Horizontal line, width = 15:")
temp = digitalclock.horizontal_line(15, 'z')
print (temp)
print ()
print ("Vertical Line, shift=0; height=3:")
temp = digitalclock.vertical_line(0, 3, '!')
print (temp)
print ()
print ("Vertical Line, shift=3; height=3:")
temp = digitalclock.vertical_line(3, 3, '&')
print (temp)
print ()
print ("Vertical Line, shift=6; height=5:")
temp = digitalclock.vertical_line(6, 5, '$')
print (temp)
print ()
print ("Two Vertical Lines, width=3; height=3:")
temp = digitalclock.two_vertical_lines(3, 3, '^')
print (temp)
print ()
print ("Two Vertical Lines, width=4; height=5:")
temp = digitalclock.two_vertical_lines(4, 5, '@')
print (temp)
print ()
print ("Two Vertical Lines, width=5; height=2:")
temp = digitalclock.two_vertical_lines(5, 2, '#')
print (temp)
print ()Expected Output:Horizontal line, width = 5:
*****
Horizontal line, width = 10:
++++++++++
Horizontal line, width = 15:
zzzzzzzzzzzzzzz
Vertical Line, shift=0; height=3:
!
!
!
Vertical Line, shift=3; height=3:
&
&
&
Vertical Line, shift=6; height=5:
$
$
$
$
$
Two Vertical Lines, width=3; height=3:
^ ^
^ ^
^ ^
Two Vertical Lines, width=4; height=5:
@ @
@ @
@ @
@ @
@ @
Two Vertical Lines, width=5; height=2:
# #
# #
Part 2b
As you can see, you have three "primitive" functions for generating simple shapes (horizontal lines, vertical lines and parallel vertical lines). Your next task is to write 10 new functions that generate the digits 0-9 using your three line functions. These functions should be stored in your 'digitalclock.py' module. The goal here is to render the digits as they would appear on a digital display:
Each function should accept a "width" argument to control how wide the number should be as well as a single character. You can assume numbers will always be printed with a height of 5. For example, here is the function for the number 1:
# function: number_1
# input: a width value (integer) and a single character (string)
# processing: generates the number 1 as it would appear on a digital display
# using the supplied width value
# output: returns the generated pattern (string)
def number_1(width, character):
pattern = vertical_line(width-1, 5, character)
return patternAnd here's a sample program that calls the function a few times (test this in your main program, not in your module):
print ("Number 1, width=5: ")
temp = digitalclock.number_1(5, '*')
print(temp)
print()
print ("Number 1, width=10: ")
temp = digitalclock.number_1(10, '*')
print(temp)
print()
print ("Number 1, width=2: ")
temp = digitalclock.number_1(2, '*')
print(temp)
print()And here's the expected output:
Number 1, width=5:
*
*
*
*
*
Number 1, width=10:
*
*
*
*
*
Number 1, width=2:
*
*
*
*
*
Here's a sample program that prints all of the numbers (0-9).
temp = digitalclock.number_0(5, '*')
print(temp)
print()
temp = digitalclock.number_1(5, '*')
print(temp)
print()
temp = digitalclock.number_2(5, '*')
print(temp)
print()
temp = digitalclock.number_3(5, '*')
print(temp)
print()
temp = digitalclock.number_4(5, '*')
print(temp)
print()
temp = digitalclock.number_5(5, '*')
print(temp)
print()
temp = digitalclock.number_6(5, '*')
print(temp)
print()
temp = digitalclock.number_7(5, '*')
print(temp)
print()
temp = digitalclock.number_8(5, '*')
print(temp)
print()
temp = digitalclock.number_9(5, '*')
print(temp)
print()And here's the expected output:
*****
* *
* *
* *
*****
*
*
*
*
*
*****
*
*****
*
*****
*****
*
*****
*
*****
* *
* *
*****
*
*
*****
*
*****
*
*****
*****
*
*****
* *
*****
*****
*
*
*
*
*****
* *
*****
* *
*****
*****
* *
*****
*
*
Part 2c
Write a function called 'print_number' that prints out any desired number to the screen. This function should also be placed in your 'digitalclock.py' module. Here's the IPO for this function:
# function: print_number
# input: a number to print (integer), a width value (integer) and a single character (string)
# processing: prints the desired number to the screen using the supplied width value
# output: does not return anythingAnd here's some sample code that you can use to test your function:
digitalclock.print_number(0, 5, '*')
digitalclock.print_number(1, 6, '*')
digitalclock.print_number(2, 7, '*')
digitalclock.print_number(3, 8, '*')
digitalclock.print_number(4, 9, '*')
digitalclock.print_number(5, 10, '*')
digitalclock.print_number(6, 11, '*')
digitalclock.print_number(7, 12, '*')
digitalclock.print_number(8, 13, '*')
digitalclock.print_number(9, 14, '*')And here's the expected output:
*****
* *
* *
* *
*****
*
*
*
*
*
*******
*
*******
*
*******
********
*
********
*
********
* *
* *
*********
*
*
**********
*
**********
*
**********
***********
*
***********
* *
***********
************
*
*
*
*
*************
* *
*************
* *
*************
**************
* *
**************
*
*
Part 2d
Write two new functions that simulate the addition and subtraction operators. Each of these functions should accept a width value as an argument (integer) and a single character (string) -- the function should then return the generated pattern. You can assume the operators will always be 5 units high. Again, these functions should be placed in your 'digitalclock.py' module. Here's some sample code:
temp = digitalclock.plus(5, '*')
print(temp)
print()
temp = digitalclock.minus(5, '*')
print(temp)Which will generate ...
*
*
*****
*
*
*****
Note that your "plus" sign may look odd if it is rendered using an even size value - for example:
# rendered using a width of 6
*
*
******
*
*
To fix this you should double up the vertical line in the center for even sizes, like this:
# rendered using a width of 6
**
**
******
**
**
Part 2e
Write a function called "check_answer" which will determine if a given addition or subtraction problem was solved correctly. This function should be inside of your "digitalclock.py" module. Here's the IPO notation for the function:
# function: check_answer
# input: two numbers (number1 & number2, both integers); an answer (an integer)
# and an operator (+ or -, expressed as a String)
# processing: determines if the supplied expression is correct. for example, if the operator
# is "+", number1 = 1, number2 = 2 and answer = 3 then the expression is correct
# (1 + 2 = 3).
# output: returns True if the expression is correct, False if it is not correct
Here's a sample program that you can use to test your function:
answer1 = digitalclock.check_answer(1, 2, 3, "+")
print (answer1)
answer2 = digitalclock.check_answer(1, 2, -1, "-")
print (answer2)
answer3 = digitalclock.check_answer(9, 5, 3, "+")
print (answer3)
answer4 = digitalclock.check_answer(8, 2, 4, "-")
print (answer4)And here's the expected output:
True
True
False
FalsePart 2f
Finally, put everything together and write a program that lets the user practice a series of random addition and subtraction problems. Begin by asking the user for a number of problems (only accept positive values) and a size for their numbers (only accept numbers between 5 and 10). Also prompt them for a single character to be used to generate their patterns - only accept single character strings (i.e. 'a' is OK, but 'apple' is not). The generate a series of random addition and subtraction problems - display the numbers to the user with your digital display functions. Then prompt the user for an answer and check the answer using your check_answer function. Your program should also keep track of how many correct questions the user answered during their game. Here's a sample running of the program:
How many problems would you like to attempt? -5
Invalid number, try again
How many problems would you like to attempt? 5
How wide do you want your digits to be? 5-10: 3
Invalid width, try again
How wide do you want your digits to be? 5-10: 5
What character would you like to use? foo
String too long, try again
What character would you like to use? *
Here we go!
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*
*
*
*
*
= 4
Correct!
What is .....
*****
*
*****
*
*****
*****
*****
*
*
*
*
= -5
Correct!
What is .....
*
*
*
*
*
*****
*****
*
*****
*
*****
= 0
Sorry, that's not correct.
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*
*
*
*
*
= 3
Correct!
What is .....
*****
*
*****
*
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 4
Correct!
You got 4 out of 5 correct!
Part 3: Extra Credit
You can add any of the following features to your game for extra credit. These are optional features and are not required to receive full credit on the assignment!:
Add multiplication problems to the game. You will have to update your check_answer function as well as add a new operator function to display the multiplication sign. Note that the visual representation of your multiplication sign does not need to be "perfect" - try and come up with a function that somewhat looks like a "X" or "*" character.
Add division problems to the game. You will have to update your check_answer function as well as add a new operator function to display the division sign. For division problems you need to ensure that the result of the problem you present is a whole number. For example, the following would be valid division problems for this game:2 / 2 = 1
4 / 2 = 2
9 / 3 = 3However, the following would NOT be valid since the answers are not whole numbers:5 / 2 = 2.5
9 / 8 = 1.125
8 / 3 = 2.6666666 (repeating)Ensure that the division problems you supply to your players always yield a whole number result. You may need to generate a few different numbers in order to do this (hint: while loop!).
Add in a "drill" mode to your game. If this mode is activated by the user they will be re-prompted to solve a problem that they got incorrect. Points are turned off in "drill" mode since the user can attempt a problem multiple times. Here's an example:How many problems would you like to attempt? 2
How wide do you want your digits to be? 5-10: 5
Would you like to activate 'drill' mode? yes or no: yes
What is .....
*****
* *
* *
* *
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 1
Sorry, that's not correct.
= 2
Sorry, that's not correct.
= 3
Correct!
What is .....
*****
* *
*****
* *
*****
*
*
*****
*
*
*****
*
*****
*
*****
= 13
Correct!
Thanks for playing!
Keep track of statistics by problem type. For example, at the end of your program you could display a display like the following that summarizes the performance of the player:Total addition problems presented: 5
Correct addition problems: 4 (80.0%)
Total subtraction problems presented: 4
Correct subtraction problems: 3 (75.0%)
No multiplication problems presented
Total division problems presented: 1
Correct division problems: 0 (0.0%)If you implemented "drill" mode you should modify your statistics display to include information about how many "extra" attempts it took so solve those problems. For example:Total addition problems presented: 5
# of extra attempts needed: 0 (perfect!)
Total subtraction problems presented: 4
# of extra attempts needed: 1
No multiplication problems presented
Total division problems presented: 1
# of extra attempts needed: 5

FIN 383 SUSS Programming a Python Script Portafolio
1. Instruction as provided in the question paper. 2. All documentation and assumptions must be indicated and made within t ...
FIN 383 SUSS Programming a Python Script Portafolio
1. Instruction as provided in the question paper. 2. All documentation and assumptions must be indicated and made within the ipynb file using either Markdown or inline comments.3. Good programming habits to ensure your code is readable4. Submit a Jupyter Notebook (ipynb) for this assignment5. Financial knowledge and python skill required6. Data will need some processing7. Errata provided for the Main ECA correction8. No Cash remaining, stock can be fractional purchase9. Portfolio drifting. To main the percentage allocation. Sell and purchase of stock is require.Example: Allocation Stock A is 60% , Stock B is 30% , Stock C is 10%Initial Price Stock A is $60 , Stock B is $30 , Stock C is $10Later Date Price Stock A is $100 , Stock B is $30 , Stock C is $10 = Total Market value is $140Therefore, allocation for Stock A is 100/140 Not 60% as required and have to sell and vice versa
Earn money selling
your Study Documents