SlideShare a Scribd company logo
1 of 18
Describe and evaluate a company’s pricing and retail strategy.
Include analysis of the current market situation and the
competitive strategy. Make sure to choose a company that you
are familiar with and one that you have not used for other
modules in the course.
Your essay should cite and discuss at least three credible
outside sources and should apply the concepts presented in the
textbook regarding pricing and retail strategies.
Your paper should be 2-3 pages in length, well written, and
formatted according to APA Style.
CS 177 – Project #2
Summer 2015
Due Date:
==========
This project is due Thursday July 23rd before 11:59pm.
This assignment is an individual project and should be
completed on your own using only your own
personally written code. You will submit one (1) copy of the
completed Python program to the
Project 2 assignment on Blackboard. The completed file will
include your name, the name of the
project and a description of its functionality and purpose of in
the comments header. The file should
be named ”Project-2.py”.
This project will continue to be the foundation of future
assignments this semester, so it is important
that you maximize your program’s functionality.
Problem Description: Expanding the Cell Movement Simulation
===============================================
======
Your first program simulating Betzig’s microscopic technology
was a huge hit and you’ve landed a
contract to expand its capabilities. Specifically, you are to
modify the behavior of both cell types,
increase their numbers and add a graphical control panel.
Crete Cells should be represented in this expanded simulation
by a random number (between 5 –
12) of small green circles with a radius of 8 pixels. These cells
will move nonlinearly in steps of up
to 6 pixels at a time, (specifically, each movement should be
between -6 and 6 pixels). This will
increase the speed of their movements, however they will still
appear jerky and random. Crete cells
cannot move outside the microscope slide, (the ‘field’), so they
may bump along the borders or
even wander out into the middle of the field at times. They must
bounce off each other and the
Laelaps cells instead of appearing to pass through them.
Laelaps cells should be represented by a random number
(between 3 - 6) of larger red circles with
a radius of 16 in this expansion. Laelaps cells move across the
field straight lines, appearing to
‘bounce’ off the field boundaries, and all the other cells in the
field of view. The dx and dy values for
each Laelaps cell will be randomly chosen from: [-12, -10, -8,
8, 10, or 12] and will change
in direction but not size when animated, only in direction.
The Control Panel should be a separate 300 x 200 graphic
window, (see example next page).
Users can view and change the simulation settings by clicking
in the labeled areas to:
• Increase / decrease the speed of the simulation
• Pause the simulation
• Increase / decrease the temperature of the microscopic field
• Drop a piece of ‘food’ into a random location on the field
Project Specifications:
====================
The Field Graphics Window #1 (from Project 1)
• 500 x 500 pixel window
• White background
• 0,0 (x,y) coordinate should be set to the lower left-hand corner
The ‘Control Panel’ Graphics Window #2 (new)
• 300 x 200 pixel window
• Gray background organized as follows:
• Actual colors of buttons and text are flexible, but must be easy
to see
• The speed and pause buttons must actually modify the
simulation in real time
• Food button should drop a 5 x 5 black square of ‘food’ in a
random Field location
• The Warmer and Cooler buttons only need to change the Temp
value displayed.
Crete Cells (updated from Project 1)
• Random number (between 5-12) of green filled circles with
radius of 8 pixels
• Move in random increments between -6 and 6 pixels per step
o Hint: use random.randint(-6, 6)
• Movements are not in straight lines, but appear wander
aimlessly
• Bounces off Laelaps cells and other Crete cells -- will not pass
‘through’ or over
• Crete cells ignore any ‘food’ in the field
Laelaps Cells (updated from Project 1)
• Random number (between 3-6) of red filled circles with a
radius of 16 pixels
• The Laelaps cell should advance in either -12, -10, -8, 8, 10 or
12 pixels per step
o Hint: use random.choice([-12, -10, -8, 8, 10, 12])
• Move more quickly than Crete cells and in straight lines
• Bounces off Crete cells and other Laelaps cells – will not pass
‘through’ or over
• Laelaps cells ignore any ‘food’ in the field
Faster
Slower
Pause Food Warmer
Cooler
Temp
42
Speed
2
TODO #1: Start with your own completed Project 1 Python file
===============================================
=====
• Refer to the Project 1 specifications for details
• You must complete Project 1 before continuing with this
assignment
• Your TAs and/or Instructors can help you finish your Project 1
if necessary
TODO #2: Modify the makeCrete() and makeLaelaps() functions
===============================================
===========
• Change the makeCrete() and makeLaelaps() functions to meet
Project 2 specifications
• The makeCrete() and makeLaelaps() functions should accept
an integer parameter that
specifies the number of cells to create. They should return the
lists of cells.
• The makeLaelaps() function might create a list of lists. This
might take the format:
[[laelaps, dx, dy], [laelaps, dx, dy], [laelaps, dx, dy]]
TODO #3: Create the Control Panel
===========================================
• Create a new 300 x 200 graphics window named “Control
Panel”
• This should have the appearance shown in the Project 2
specifications above
• The buttons and functionality of the Control Panel should be
as specified above
TODO #4: Modify the main() function
==================================
• Using the makeCrete() function, create a list of Crete cells and
draw in the Field window
• Using the makeLaelaps() function, create the Laelaps cells and
draw in the Field window
• Using a while loop, animate the Crete and Laelaps cells in the
Field window
o Animate each Crete cells making sure they bounce off the
boundaries of the Field
window and the other Crete cells
o Animate the Laelaps cells making sure they bounce off the
Field boundaries, the
other Laelaps cells and Crete cells
o Check for and respond to mouse clicks in the Control Panel
graphics window
o End the while loop if a mouse click is detected in the Field
graphics window
• Close the Field and Control Panel graphics windows
• Print a message that the simulation has terminated
Extra Credit Challenges: 10 points each only if TODO #1 - 5
are complete
===============================================
================
• DINNER TIME: Cells contacting food will increase their
radius by 2 pixels, (food disappears)
• HOT IN HERE: Higher temperatures cause Laelaps to move
faster, Crete to move slower.
Lower temps would have the opposite effect.
Project 2 Grading Rubric: Points
TODO #1: Simulation meets all Project 1 Specifications 5
TODO #2: Crete cell creation and returned list updated as
specified 10
TODO #2: Laelaps cell creation and returned list updated as
specified 10
TODO #3: Control Panel: Graphics window created, appears as
specified 10
TODO #3: Control Panel: Speed and Pause buttons function as
specified 15
TODO #3: Control Panel: Food button functions as specified 10
TODO #3: Control Panel: Warmer and Cooler buttons function
as specified 10
TODO #4: main() function uses makeCrete() and makeLaelaps()
to create cell lists 5
TODO #5: Cells move as specified within the Field window 15
TODO #5: Animation terminates, windows close when mouse
clicked in the Field window 5
TODO #5: Message is displayed indicating the simulation has
terminated 5
Total Points 100
You will submit one (1) copy of the completed Python program
to the Project 2 assignment on
Blackboard. The completed file will include your name, the
name of the project and a description of
its functionality and purpose of in the comments header. The
file should be named ”Project-2.py”.
Coding Standards and Guidelines:
=============================
In this project, you are required to follow modular coding
standards, particularly with respect to
modular design, indentation and comments. Your score will be
affected if your code does not
conform to these standards.
Modular Design
Divide your program into functions to improve readability and
to reduce redundanct code. Your
Python code should not have repetitve copies of the same block
of statements. Instead, functions
to simplify and reduce the size of your code.
For example, if you had to find the distance between two x,y
coordinate points in several different
parts of your code, instead of creating the formula to calculate
this distance over and over again,
create a function “def distance(x1, y1, x2, y2):” and code it to
calculate and return the distance
between the point using the Pythagorean Theorum.
Indentation
Following are a few rules on how to use indentation in your
program,
• Use tabs for indentations
• Pay attention to indentation in nested for loops and if-else
blocks
Comments
Your code for this project must also include appropriate
comments about how functions are
implemented. Comments make your code more readable and
easier to understand.
• Add a comment before a function describing what it does.
• Before a nested for loop, describe what happens in the loop
and what controls the
iterations.
• Before an if-else block, explain what should happen for both
the true and false cases.
• Always make a priority of keeping the comments up-to-date
when the code changes.
For all variables that you use in your program, use meaningful
variable and function names to help
make your program more readable. Names do not have to be
long, but should give a clear
indication of the intended purpose of the variable.
CS 177 – Project #1
Summer 2015
Due Date:
==========
This project is due Thursday July 9th before 11:59pm.
This assignment is an individual project and should be
completed on your own using only your own
personally written code. You will submit one (1) copy of the
completed Python program to the
Project 1 assignment on Blackboard. The completed file will
include your name, the name of the
project and a description of its functionality and purpose of in
the comments header. The file should
be named ”Project-1.py”.
This project will be the foundation of future assignments this
semester, so it is important that you
maximize your program’s functionality.
Problem Description: Simulating the Movements of Cells in a
Microscope
===============================================
===============
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his
research in microscope technology.
Since receiving the award, Betzig has improved the technology
so that cell functions, growth and
even movements can now be seen in real time while minimizing
the damage caused by prior
methods. This allows the direct study of living nerve cells
forming synapses in the brain, cells
undergoing mitosis and internal cell functions like protein
translation and mitochondrial movements.
Your assignment is to write a Python program that graphically
simulates viewing cellular organisms,
as they might be observed using Betzig’s technology. These
simulated cells will be shown in a
graphics window (representing the field of view through
Betzig’s microscope) and must be
animated, exhibiting behaviors based on the “Project
Specifications” below. The simulation will
terminate based on user input (a mouse click) and will include
two (2) types of cells, Crete and
Laelaps, (pronounced KREET and LEE-laps).
Crete cells should be represented in this simulation as three (3)
small green circles with a radius of
8 pixels. These cells move nonlinearly in steps of 1-4 graphics
window pixels. This makes their
movement appear jerky and random. Crete cells cannot move
outside the microscope slide, (the
‘field’), so they may bump along the borders or even wander out
into the middle of the field at times.
These cells have the ability to pass “through” each other.
A single red circle with a radius of 16 pixels will represent a
Laelaps cell in this simulation. Laelaps
cells move across the field straight lines, appearing to ‘bounce’
off the field boundaries. Laelaps
sometimes appear to pass through other cells, however this is an
optical illusion as they are very
thin and tend to slide over or under the other cells in the field of
view.
Project Specifications:
====================
Graphics Window
• 500 x 500 pixel window
• White background
• 0,0 (x,y) coordinate should be set to the lower left-hand corner
Crete Cells
• Three (3) green filled circles with radius of 8 pixels
• Move in random increments between -4 and 4 pixels per step
• Movements are not in straight lines, but appear wander
aimlessly
Laelaps Cells
• One (1) red filled circle with a radius of 16 pixels
• Move more quickly than Crete cells and in straight lines
• The Laelaps cell should advance in either -10 or 10 pixels per
step
TODO #1: Initialize the simulation environment
========================================
• Import any libraries needed for the simulation
• Display a welcome message in the Python Shell. Describe the
program’s functionality
• Create the 500 x 500 graphics window named “Field”
• Set the Field window parameters as specified
TODO #2: Create the Crete cells – makeCrete()
========================================
• Write a function that creates three green circle objects (radius
8) and stores them in a list
• Each entry of the list represents one Crete cell
• The starting (x, y) locations of the Crete cells will be random
values between 50 – 450
• The function should return the list of Crete cells
TODO #3: Create the Laelaps cell – makeLaelaps()
===========================================
• Write a function that creates a list containing a single entry; a
red filled circle (radius 16)
representing the Laelaps cell
• The starting (x, y) location of these cells should be random
values between 100–400
• Add two randomly selected integers to the list. They should be
either -10 or 10
• The function should return the Laelaps cell list
TODO #4: Define the bounce() function
==================================
• Write a function that accepts two (2) integers as parameters
• If the first integer is either less than 10 or greater than 490,
the function should return the
inverse value of the 2nd integer, (ie: multiplying it by -1)
• Otherwise, the function should return the 2nd integer
unmodified
TODO #5: Define the main() function
==================================
• Using the makeCrete() function, create a list of Crete cells
• Draw the Crete cells in the Field graphics window
• Using the makeLaelaps() function, create the Laelaps list
• Draw the Laelaps cell in the Field window
• Using a while loop, animate the cells in the Field window
o Animate each Crete cell by moving it’s (x,y) position by a
number of pixels specified
by a randomly selected integer between -4 and 4
o Animate the Laelaps cell by moving it’s (x,y) position by the
number of pixels
specified in the integer values in it’s list (this will always be
either -10 or 10 pixels)
o HINT: Use the bounce() function to make sure the change in a
cell’s position doesn’t
move the cell outside the Field boundaries
o End the while loop if a mouse click is detected in the Field
graphics window
• Close the Field graphics window
• Print a message that the simulation has terminated
Extra Credit Challenges: 10 points each only if TODO #1 - 5
are complete
===============================================
================
• CROSSING GUARD: Laelaps cell ‘bounces’ off the Crete
cells instead sliding past them
• NO PASSING ZONE: Crete cells bounce off each other
instead of passing through
Project 1 Grading Rubric: Points
TODO #1: Libraries imported, message shown, graphics window
created to specifications 15
TODO #2: List of three (3) circle objects is created as specified
10
TODO #2: makeCrete() function properly returns list of circle
objects 5
TODO #3: List including one circle object and 2 integers is
created as specified 10
TODO #3: makeLaelaps() function properly returns list 5
TODO #4: bounce() function created as specified 10
TODO #5: makeCrete() and makeLaelaps() functions called,
lists created successfully 10
TODO #5: Crete and LaeLaps cells drawn in the Field window 5
TODO #5: Cells move as specified within the Field window,
bouncing off boundaries 20
TODO #5: Animation loop terminates when mouse clicked in
the Field window 5
TODO #5: Message is displayed indicating the simulation has
terminated 5
Total Points 100
You will submit one (1) copy of the completed Python program
to the Project 1 assignment on
Blackboard. The completed file will include your name, the
name of the project and a description of
its functionality and purpose of in the comments header. The
file should be named ”Project-1.py”.
Coding Standards and Guidelines:
=============================
In this project, you are required to follow modular coding
standards, particularly with respect to
modular design, indentation and comments. Your score will be
affected if your code does not
conform to these standards.
Modular Design
Divide your program into functions to improve readability and
to reduce redundanct code. Your
Python code should not have repetitve copies of the same block
of statements. Instead, functions
to simplify and reduce the size of your code.
For example, if you had to find the distance between two x,y
coordinate points in several different
parts of your code, instead of creating the formula to calculate
this distance over and over again,
create a function “def distance(x1, y1, x2, y2):” and code it to
calculate and return the distance
between the point using the Pythagorean Theorum.
Indentation
Following are a few rules on how to use indentation in your
program,
• Use tabs for indentations
• Pay attention to indentation in nested for loops and if-else
blocks
Comments
Your code for this project must also include appropriate
comments about how functions are
implemented. Comments make your code more readable and
easier to understand.
• Add a comment before a function describing what it does.
• Before a nested for loop, describe what happens in the loop
and what controls the
iterations.
• Before an if-else block, explain what should happen for both
the true and false cases.
• Always make a priority of keeping the comments up-to-date
when the code changes.
For all variables that you use in your program, use meaningful
variable and function names to help
make your program more readable. Names do not have to be
long, but should give a clear
indication of the intended purpose of the variable.

More Related Content

Similar to Describe and evaluate a company’s pricing and retail strategy. Inc.docx

Useful macros and functions for excel
Useful macros and functions for excelUseful macros and functions for excel
Useful macros and functions for excelNihar Ranjan Paital
 
Lecture 01 variables scripts and operations
Lecture 01   variables scripts and operationsLecture 01   variables scripts and operations
Lecture 01 variables scripts and operationsSmee Kaem Chann
 
Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016Ram Sriharsha
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2Paul Brebner
 
Altium productivity
Altium productivityAltium productivity
Altium productivityAlex Borisov
 
Magazine awr-ims-3
Magazine awr-ims-3Magazine awr-ims-3
Magazine awr-ims-3Sam Sambala
 
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docx
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docxIn 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docx
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docxjoyjonna282
 
Productivity Tips For Altium Designer
Productivity Tips For Altium DesignerProductivity Tips For Altium Designer
Productivity Tips For Altium DesignerSchattke
 
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationTowards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationDaniel Lehner
 
Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02auswhit
 
Excel useful tips
Excel useful tipsExcel useful tips
Excel useful tipsMohsin Azad
 

Similar to Describe and evaluate a company’s pricing and retail strategy. Inc.docx (20)

Matopt
MatoptMatopt
Matopt
 
Useful macros and functions for excel
Useful macros and functions for excelUseful macros and functions for excel
Useful macros and functions for excel
 
Lecture 01 variables scripts and operations
Lecture 01   variables scripts and operationsLecture 01   variables scripts and operations
Lecture 01 variables scripts and operations
 
Data herding
Data herdingData herding
Data herding
 
Data herding
Data herdingData herding
Data herding
 
Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016Online learning with structured streaming, spark summit brussels 2016
Online learning with structured streaming, spark summit brussels 2016
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2
 
Altium productivity
Altium productivityAltium productivity
Altium productivity
 
Magazine awr-ims-3
Magazine awr-ims-3Magazine awr-ims-3
Magazine awr-ims-3
 
Excel tips 172
Excel tips 172Excel tips 172
Excel tips 172
 
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docx
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docxIn 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docx
In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his res.docx
 
Productivity Tips For Altium Designer
Productivity Tips For Altium DesignerProductivity Tips For Altium Designer
Productivity Tips For Altium Designer
 
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven OptimizationTowards Reactive Planning With Digital Twins and Model-Driven Optimization
Towards Reactive Planning With Digital Twins and Model-Driven Optimization
 
Excel Tips
Excel TipsExcel Tips
Excel Tips
 
Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02
 
Excel useful tips
Excel useful tipsExcel useful tips
Excel useful tips
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Excel tips
Excel tipsExcel tips
Excel tips
 
Excel Useful Tips
Excel Useful TipsExcel Useful Tips
Excel Useful Tips
 

More from theodorelove43763

Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxExam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxtheodorelove43763
 
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxEvolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxtheodorelove43763
 
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxexam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxtheodorelove43763
 
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxEvolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxtheodorelove43763
 
Evidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxEvidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxtheodorelove43763
 
Evidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxEvidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxtheodorelove43763
 
Evidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxEvidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxtheodorelove43763
 
Evidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxEvidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxtheodorelove43763
 
Evidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxEvidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxtheodorelove43763
 
Everyone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxEveryone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxtheodorelove43763
 
Even though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxEven though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxtheodorelove43763
 
Even though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxEven though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxtheodorelove43763
 
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxEvaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxtheodorelove43763
 
Evaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxEvaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxtheodorelove43763
 
Evaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxEvaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxtheodorelove43763
 
Evaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxEvaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxtheodorelove43763
 
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback  Addressi.docxEvaluating 19-Channel Z-score Neurofeedback  Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback Addressi.docxtheodorelove43763
 
Evaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxEvaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxtheodorelove43763
 
Evaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxEvaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxtheodorelove43763
 
Evaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxEvaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxtheodorelove43763
 

More from theodorelove43763 (20)

Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docxExam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
Exam Questions1. (Mandatory) Assess the strengths and weaknesse.docx
 
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docxEvolving Leadership roles in HIM1. Increased adoption of hea.docx
Evolving Leadership roles in HIM1. Increased adoption of hea.docx
 
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docxexam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
exam 2 logiWhatsApp Image 2020-01-18 at 1.01.20 AM (1).jpeg.docx
 
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docxEvolution of Terrorism300wrdDo you think terrorism has bee.docx
Evolution of Terrorism300wrdDo you think terrorism has bee.docx
 
Evidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docxEvidence-based practice is an approach to health care where health c.docx
Evidence-based practice is an approach to health care where health c.docx
 
Evidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docxEvidence-Based EvaluationEvidence-based practice is importan.docx
Evidence-Based EvaluationEvidence-based practice is importan.docx
 
Evidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docxEvidence TableStudy CitationDesignMethodSampleData C.docx
Evidence TableStudy CitationDesignMethodSampleData C.docx
 
Evidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docxEvidence SynthesisCritique the below evidence synthesis ex.docx
Evidence SynthesisCritique the below evidence synthesis ex.docx
 
Evidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docxEvidence Collection PolicyScenarioAfter the recent secur.docx
Evidence Collection PolicyScenarioAfter the recent secur.docx
 
Everyone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docxEveryone Why would companies have quality programs even though they.docx
Everyone Why would companies have quality programs even though they.docx
 
Even though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docxEven though technology has shifted HRM to strategic partner, has thi.docx
Even though technology has shifted HRM to strategic partner, has thi.docx
 
Even though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docxEven though people are aware that earthquakes and volcanoes typi.docx
Even though people are aware that earthquakes and volcanoes typi.docx
 
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docxEvaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
Evaluative Essay 2 Grading RubricCriteriaLevels of Achievement.docx
 
Evaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docxEvaluation Title Research DesignFor this first assignment, .docx
Evaluation Title Research DesignFor this first assignment, .docx
 
Evaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docxEvaluation is the set of processes and methods that managers and sta.docx
Evaluation is the set of processes and methods that managers and sta.docx
 
Evaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docxEvaluation Plan with Policy RecommendationAfter a program ha.docx
Evaluation Plan with Policy RecommendationAfter a program ha.docx
 
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback  Addressi.docxEvaluating 19-Channel Z-score Neurofeedback  Addressi.docx
Evaluating 19-Channel Z-score Neurofeedback Addressi.docx
 
Evaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docxEvaluate the history of the Data Encryption Standard (DES) and then .docx
Evaluate the history of the Data Encryption Standard (DES) and then .docx
 
Evaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docxEvaluate the Health History and Medical Information for Mrs. J.,.docx
Evaluate the Health History and Medical Information for Mrs. J.,.docx
 
Evaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docxEvaluate the environmental factors that contribute to corporate mana.docx
Evaluate the environmental factors that contribute to corporate mana.docx
 

Recently uploaded

ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 

Recently uploaded (20)

ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 

Describe and evaluate a company’s pricing and retail strategy. Inc.docx

  • 1. Describe and evaluate a company’s pricing and retail strategy. Include analysis of the current market situation and the competitive strategy. Make sure to choose a company that you are familiar with and one that you have not used for other modules in the course. Your essay should cite and discuss at least three credible outside sources and should apply the concepts presented in the textbook regarding pricing and retail strategies. Your paper should be 2-3 pages in length, well written, and formatted according to APA Style. CS 177 – Project #2 Summer 2015 Due Date: ========== This project is due Thursday July 23rd before 11:59pm. This assignment is an individual project and should be completed on your own using only your own personally written code. You will submit one (1) copy of the completed Python program to the Project 2 assignment on Blackboard. The completed file will include your name, the name of the project and a description of its functionality and purpose of in the comments header. The file should be named ”Project-2.py”. This project will continue to be the foundation of future assignments this semester, so it is important
  • 2. that you maximize your program’s functionality. Problem Description: Expanding the Cell Movement Simulation =============================================== ====== Your first program simulating Betzig’s microscopic technology was a huge hit and you’ve landed a contract to expand its capabilities. Specifically, you are to modify the behavior of both cell types, increase their numbers and add a graphical control panel. Crete Cells should be represented in this expanded simulation by a random number (between 5 – 12) of small green circles with a radius of 8 pixels. These cells will move nonlinearly in steps of up to 6 pixels at a time, (specifically, each movement should be between -6 and 6 pixels). This will increase the speed of their movements, however they will still appear jerky and random. Crete cells cannot move outside the microscope slide, (the ‘field’), so they may bump along the borders or even wander out into the middle of the field at times. They must bounce off each other and the Laelaps cells instead of appearing to pass through them. Laelaps cells should be represented by a random number (between 3 - 6) of larger red circles with a radius of 16 in this expansion. Laelaps cells move across the field straight lines, appearing to ‘bounce’ off the field boundaries, and all the other cells in the field of view. The dx and dy values for each Laelaps cell will be randomly chosen from: [-12, -10, -8, 8, 10, or 12] and will change in direction but not size when animated, only in direction.
  • 3. The Control Panel should be a separate 300 x 200 graphic window, (see example next page). Users can view and change the simulation settings by clicking in the labeled areas to: • Increase / decrease the speed of the simulation • Pause the simulation • Increase / decrease the temperature of the microscopic field • Drop a piece of ‘food’ into a random location on the field Project Specifications: ==================== The Field Graphics Window #1 (from Project 1) • 500 x 500 pixel window • White background • 0,0 (x,y) coordinate should be set to the lower left-hand corner The ‘Control Panel’ Graphics Window #2 (new) • 300 x 200 pixel window • Gray background organized as follows: • Actual colors of buttons and text are flexible, but must be easy to see • The speed and pause buttons must actually modify the simulation in real time • Food button should drop a 5 x 5 black square of ‘food’ in a random Field location • The Warmer and Cooler buttons only need to change the Temp value displayed.
  • 4. Crete Cells (updated from Project 1) • Random number (between 5-12) of green filled circles with radius of 8 pixels • Move in random increments between -6 and 6 pixels per step o Hint: use random.randint(-6, 6) • Movements are not in straight lines, but appear wander aimlessly • Bounces off Laelaps cells and other Crete cells -- will not pass ‘through’ or over • Crete cells ignore any ‘food’ in the field Laelaps Cells (updated from Project 1) • Random number (between 3-6) of red filled circles with a radius of 16 pixels • The Laelaps cell should advance in either -12, -10, -8, 8, 10 or 12 pixels per step o Hint: use random.choice([-12, -10, -8, 8, 10, 12]) • Move more quickly than Crete cells and in straight lines • Bounces off Crete cells and other Laelaps cells – will not pass ‘through’ or over • Laelaps cells ignore any ‘food’ in the field Faster Slower Pause Food Warmer
  • 5. Cooler Temp 42 Speed 2 TODO #1: Start with your own completed Project 1 Python file =============================================== ===== • Refer to the Project 1 specifications for details • You must complete Project 1 before continuing with this assignment • Your TAs and/or Instructors can help you finish your Project 1 if necessary TODO #2: Modify the makeCrete() and makeLaelaps() functions =============================================== =========== • Change the makeCrete() and makeLaelaps() functions to meet Project 2 specifications • The makeCrete() and makeLaelaps() functions should accept an integer parameter that specifies the number of cells to create. They should return the lists of cells. • The makeLaelaps() function might create a list of lists. This might take the format: [[laelaps, dx, dy], [laelaps, dx, dy], [laelaps, dx, dy]]
  • 6. TODO #3: Create the Control Panel =========================================== • Create a new 300 x 200 graphics window named “Control Panel” • This should have the appearance shown in the Project 2 specifications above • The buttons and functionality of the Control Panel should be as specified above TODO #4: Modify the main() function ================================== • Using the makeCrete() function, create a list of Crete cells and draw in the Field window • Using the makeLaelaps() function, create the Laelaps cells and draw in the Field window • Using a while loop, animate the Crete and Laelaps cells in the Field window o Animate each Crete cells making sure they bounce off the boundaries of the Field window and the other Crete cells o Animate the Laelaps cells making sure they bounce off the Field boundaries, the other Laelaps cells and Crete cells o Check for and respond to mouse clicks in the Control Panel graphics window o End the while loop if a mouse click is detected in the Field graphics window
  • 7. • Close the Field and Control Panel graphics windows • Print a message that the simulation has terminated Extra Credit Challenges: 10 points each only if TODO #1 - 5 are complete =============================================== ================ • DINNER TIME: Cells contacting food will increase their radius by 2 pixels, (food disappears) • HOT IN HERE: Higher temperatures cause Laelaps to move faster, Crete to move slower. Lower temps would have the opposite effect. Project 2 Grading Rubric: Points TODO #1: Simulation meets all Project 1 Specifications 5 TODO #2: Crete cell creation and returned list updated as specified 10 TODO #2: Laelaps cell creation and returned list updated as specified 10 TODO #3: Control Panel: Graphics window created, appears as specified 10 TODO #3: Control Panel: Speed and Pause buttons function as specified 15 TODO #3: Control Panel: Food button functions as specified 10 TODO #3: Control Panel: Warmer and Cooler buttons function as specified 10
  • 8. TODO #4: main() function uses makeCrete() and makeLaelaps() to create cell lists 5 TODO #5: Cells move as specified within the Field window 15 TODO #5: Animation terminates, windows close when mouse clicked in the Field window 5 TODO #5: Message is displayed indicating the simulation has terminated 5 Total Points 100 You will submit one (1) copy of the completed Python program to the Project 2 assignment on Blackboard. The completed file will include your name, the name of the project and a description of its functionality and purpose of in the comments header. The file should be named ”Project-2.py”. Coding Standards and Guidelines: ============================= In this project, you are required to follow modular coding standards, particularly with respect to modular design, indentation and comments. Your score will be affected if your code does not conform to these standards. Modular Design Divide your program into functions to improve readability and to reduce redundanct code. Your Python code should not have repetitve copies of the same block of statements. Instead, functions to simplify and reduce the size of your code. For example, if you had to find the distance between two x,y
  • 9. coordinate points in several different parts of your code, instead of creating the formula to calculate this distance over and over again, create a function “def distance(x1, y1, x2, y2):” and code it to calculate and return the distance between the point using the Pythagorean Theorum. Indentation Following are a few rules on how to use indentation in your program, • Use tabs for indentations • Pay attention to indentation in nested for loops and if-else blocks Comments Your code for this project must also include appropriate comments about how functions are implemented. Comments make your code more readable and easier to understand. • Add a comment before a function describing what it does. • Before a nested for loop, describe what happens in the loop and what controls the iterations. • Before an if-else block, explain what should happen for both the true and false cases. • Always make a priority of keeping the comments up-to-date when the code changes. For all variables that you use in your program, use meaningful variable and function names to help make your program more readable. Names do not have to be
  • 10. long, but should give a clear indication of the intended purpose of the variable. CS 177 – Project #1 Summer 2015 Due Date: ========== This project is due Thursday July 9th before 11:59pm. This assignment is an individual project and should be completed on your own using only your own personally written code. You will submit one (1) copy of the completed Python program to the Project 1 assignment on Blackboard. The completed file will include your name, the name of the project and a description of its functionality and purpose of in the comments header. The file should be named ”Project-1.py”. This project will be the foundation of future assignments this semester, so it is important that you maximize your program’s functionality. Problem Description: Simulating the Movements of Cells in a Microscope =============================================== =============== In 2014 Virginia scientist Eric Betzig won a Nobel Prize for his
  • 11. research in microscope technology. Since receiving the award, Betzig has improved the technology so that cell functions, growth and even movements can now be seen in real time while minimizing the damage caused by prior methods. This allows the direct study of living nerve cells forming synapses in the brain, cells undergoing mitosis and internal cell functions like protein translation and mitochondrial movements. Your assignment is to write a Python program that graphically simulates viewing cellular organisms, as they might be observed using Betzig’s technology. These simulated cells will be shown in a graphics window (representing the field of view through Betzig’s microscope) and must be animated, exhibiting behaviors based on the “Project Specifications” below. The simulation will terminate based on user input (a mouse click) and will include two (2) types of cells, Crete and Laelaps, (pronounced KREET and LEE-laps). Crete cells should be represented in this simulation as three (3) small green circles with a radius of 8 pixels. These cells move nonlinearly in steps of 1-4 graphics window pixels. This makes their movement appear jerky and random. Crete cells cannot move outside the microscope slide, (the ‘field’), so they may bump along the borders or even wander out into the middle of the field at times. These cells have the ability to pass “through” each other. A single red circle with a radius of 16 pixels will represent a
  • 12. Laelaps cell in this simulation. Laelaps cells move across the field straight lines, appearing to ‘bounce’ off the field boundaries. Laelaps sometimes appear to pass through other cells, however this is an optical illusion as they are very thin and tend to slide over or under the other cells in the field of view. Project Specifications: ==================== Graphics Window • 500 x 500 pixel window • White background • 0,0 (x,y) coordinate should be set to the lower left-hand corner Crete Cells • Three (3) green filled circles with radius of 8 pixels • Move in random increments between -4 and 4 pixels per step • Movements are not in straight lines, but appear wander aimlessly Laelaps Cells • One (1) red filled circle with a radius of 16 pixels • Move more quickly than Crete cells and in straight lines • The Laelaps cell should advance in either -10 or 10 pixels per step
  • 13. TODO #1: Initialize the simulation environment ======================================== • Import any libraries needed for the simulation • Display a welcome message in the Python Shell. Describe the program’s functionality • Create the 500 x 500 graphics window named “Field” • Set the Field window parameters as specified TODO #2: Create the Crete cells – makeCrete() ======================================== • Write a function that creates three green circle objects (radius 8) and stores them in a list • Each entry of the list represents one Crete cell • The starting (x, y) locations of the Crete cells will be random values between 50 – 450 • The function should return the list of Crete cells TODO #3: Create the Laelaps cell – makeLaelaps() =========================================== • Write a function that creates a list containing a single entry; a red filled circle (radius 16) representing the Laelaps cell • The starting (x, y) location of these cells should be random values between 100–400 • Add two randomly selected integers to the list. They should be either -10 or 10 • The function should return the Laelaps cell list
  • 14. TODO #4: Define the bounce() function ================================== • Write a function that accepts two (2) integers as parameters • If the first integer is either less than 10 or greater than 490, the function should return the inverse value of the 2nd integer, (ie: multiplying it by -1) • Otherwise, the function should return the 2nd integer unmodified TODO #5: Define the main() function ================================== • Using the makeCrete() function, create a list of Crete cells • Draw the Crete cells in the Field graphics window • Using the makeLaelaps() function, create the Laelaps list • Draw the Laelaps cell in the Field window • Using a while loop, animate the cells in the Field window o Animate each Crete cell by moving it’s (x,y) position by a number of pixels specified by a randomly selected integer between -4 and 4 o Animate the Laelaps cell by moving it’s (x,y) position by the number of pixels specified in the integer values in it’s list (this will always be either -10 or 10 pixels) o HINT: Use the bounce() function to make sure the change in a cell’s position doesn’t move the cell outside the Field boundaries
  • 15. o End the while loop if a mouse click is detected in the Field graphics window • Close the Field graphics window • Print a message that the simulation has terminated Extra Credit Challenges: 10 points each only if TODO #1 - 5 are complete =============================================== ================ • CROSSING GUARD: Laelaps cell ‘bounces’ off the Crete cells instead sliding past them • NO PASSING ZONE: Crete cells bounce off each other instead of passing through Project 1 Grading Rubric: Points TODO #1: Libraries imported, message shown, graphics window created to specifications 15 TODO #2: List of three (3) circle objects is created as specified 10 TODO #2: makeCrete() function properly returns list of circle objects 5 TODO #3: List including one circle object and 2 integers is created as specified 10 TODO #3: makeLaelaps() function properly returns list 5 TODO #4: bounce() function created as specified 10 TODO #5: makeCrete() and makeLaelaps() functions called,
  • 16. lists created successfully 10 TODO #5: Crete and LaeLaps cells drawn in the Field window 5 TODO #5: Cells move as specified within the Field window, bouncing off boundaries 20 TODO #5: Animation loop terminates when mouse clicked in the Field window 5 TODO #5: Message is displayed indicating the simulation has terminated 5 Total Points 100 You will submit one (1) copy of the completed Python program to the Project 1 assignment on Blackboard. The completed file will include your name, the name of the project and a description of its functionality and purpose of in the comments header. The file should be named ”Project-1.py”. Coding Standards and Guidelines: ============================= In this project, you are required to follow modular coding standards, particularly with respect to modular design, indentation and comments. Your score will be affected if your code does not conform to these standards. Modular Design Divide your program into functions to improve readability and to reduce redundanct code. Your Python code should not have repetitve copies of the same block of statements. Instead, functions to simplify and reduce the size of your code.
  • 17. For example, if you had to find the distance between two x,y coordinate points in several different parts of your code, instead of creating the formula to calculate this distance over and over again, create a function “def distance(x1, y1, x2, y2):” and code it to calculate and return the distance between the point using the Pythagorean Theorum. Indentation Following are a few rules on how to use indentation in your program, • Use tabs for indentations • Pay attention to indentation in nested for loops and if-else blocks Comments Your code for this project must also include appropriate comments about how functions are implemented. Comments make your code more readable and easier to understand. • Add a comment before a function describing what it does. • Before a nested for loop, describe what happens in the loop and what controls the iterations. • Before an if-else block, explain what should happen for both the true and false cases. • Always make a priority of keeping the comments up-to-date when the code changes. For all variables that you use in your program, use meaningful variable and function names to help
  • 18. make your program more readable. Names do not have to be long, but should give a clear indication of the intended purpose of the variable.