Recursive and Iterative Drawing in Python with Turtle
Homework 2
DrawStar(S, N)
Recursion to draw snowflake
python
def DrawStar(S, N):
"""
Recursion to draw snowflake
"""
if N == 1:
pass
else:
turtle.forward(S/3)
DrawStar(S/3, N-1)
turtle.forward(-S/3)
turtle.left(60)
turtle.forward(S/3)
DrawStar(S/3, N-1)
turtle.forward(-S/3)
turtle.left(60)
turtle.forward(S/3)
DrawStar(S/3, N-1)
turtle.forward(-S/3)
turtle.left(120)
turtle.forward(S/3)
DrawStar(S/3, N-1)
turtle.forward(-S/3)
turtle.left(60)
turtle.forward(S/3)
DrawStar(S/3, N-1)
turtle.forward(-S/3)
Psychological Models of Criminal Behavior
ITEM 9. Psychological Models of Criminal Behavior
Psychological models offer a framework for understanding criminal behavior through the lens of normal and pathological mental processes. Let’s delve into some prominent models:
I. Psychoanalytic Theory or Psychodynamic Models
This model, pioneered by Sigmund Freud (1856-1939), posits that criminal behavior stems from unresolved psychological conflicts and unconscious drives. Key features include:
- Biological Determinism: The unconscious mind significantly
Understanding Risk Management in IT Infrastructure
Risk and Its Impact on Business
Understanding Risk
Risk is the likelihood of a loss occurring when a threat exposes a vulnerability. Losses can range from small to severe, potentially causing significant damage to a business.
- Threat: Any activity posing a possible danger.
- Vulnerability: A weakness that can be exploited.
- Loss: A compromise of business functions or assets, resulting in tangible (cost) or intangible (goodwill) damages.
Compromise of Business Assets
- Assets are anything with measurable value
CCENT/CCNA ICND1 100-105: Network Configuration and Troubleshooting
1. Configuring Port Security on a LAN Switch
A network technician is configuring port security on a LAN switch interface. The security policy requires host MAC addresses to be learned dynamically, stored in the address table, and saved to the switch running configuration. To implement this policy, the technician needs to add the following command:
Switch(config-if)# switchport port-security mac-address sticky
2. Remote Switch Management
An administrator would configure an IP address on the VLAN 1 interface
Read MoreUnderstanding Network Protocols and Architectures
Network Protocols and Architectures
Transport Services and Protocols
Transport services and protocols provide communication between application processes running on different hosts.
- Send side: Breaks application messages into segments and passes them to the network layer.
- Receive side: Reassembles segments into messages and passes them to the application layer.
Network and Transport Layers
Network layer: Enables logical communication between hosts.
Transport layer: Facilitates local communication between
Read MoreUnderstanding Drama: Conflict, Narrative, and Storytelling in Audiovisual Works
I. Introduction to Drama
a) What is Drama?
Drama, in its simplest form, is a representation of action presented to an audience. This action is driven by characters and fueled by conflict.
The Foundation of Drama:
- Conflict (Struggle of wills)
- Action
- Characters (Personajes)
b) Law of Conflict
A conflict in drama should be a dramatic social conflict.
c) Classification of Conflicts
- Man against Man
- Man against his Environment
- Man against Himself
d) Theme
The theme is the core essence of a work, expressed in a single
Read MorePsychology Unit 3: Cognition, Language, Problem-Solving, and Intelligence
Psychology Unit 3
ITEM 1: Basic Concepts and Units of Thought
– Cognition: The action and effect of knowing.
– Thinking: The action and effect of thinking.
– Mental Representations: Parts of our knowledge and the main elements of knowledge, such as symbols and signs.
– Category: A class that is a classification of attributes.
– Definition: A mental representation of an event, object, attribute, etc.
– Dialectic: A method to solve problems that are carried out by comparing, contrasting, and opposing facts
Read MoreInvestment and Financing Strategies for Business Success
Investment and Financing
Investing and Financing Defined
Investing is the process of allocating financial resources to acquire, renovate, or improve assets like property and equipment. The goal is to enhance the productive or commercial activities of a company. Financing, on the other hand, involves obtaining the necessary financial resources to cover business expenses.
Budgeting
A budget is a numerical plan that outlines how resources will be allocated to specific activities. When making investment
Read MoreUnderstanding ISO 4335: HDLC Frame Structure and Control Field Formats
ISO 4335 – HDLC
Reference Standard
ISO 3309 and ISO 4335
HDLC Frame Structure: Fields
| Length | Field |
|---|---|
| 1 or n octets | Address |
| 1 or 2 octets | Control |
| n octets | Optional Information |
| 2 octets | Frame Control Sequence |
HDLC Frame Structure: Address Field
Reference Standard
ISO 3309
The address field identifies a frame as either a command or a response. A command frame contains the address of a station to which the command is being sent. A response frame contains the address of the station sending the frame.
Address Field Basic
Read MoreEssential Juniper EX Series Switch Commands: Configuration and Troubleshooting
General Juniper EX Series Switch Commands
Basic Commands
Show MAC Address Table
show ethernet-switching table brief
Show Directly Connected Switches
show lldp neighbors
Configure VLAN
set vlans Floor_Users vlan-id 90 set vlans Floor_Users l3-interface vlan.90 set interfaces vlan unit 90 family inet address 10.10.10.254/24
Assign VLAN to Port
set interfaces unit 0 family ethernet-switching vlan members
Upgrade Juniper EX Series Switch
(May be needed – set system services ftp, when upgrading 8200 need to upgrade
Read More