Skip to content

Latest commit

 

History

History
119 lines (95 loc) · 2.48 KB

PITCHME.md

File metadata and controls

119 lines (95 loc) · 2.48 KB

Sheriff Adeoti


Summary
On
Andela Homestudy Curriculum

Module 1


Computer Science
Computer science is the study of problems, problem-solving, and the solutions that come out of the problem-solving process.
A computer scientist’s goal is to develop an algorithm, a stepby- step list of instructions for solving any instance of the problem that might arise.

Module 2


Programming
Programming is the process of taking an algorithm and encoding it into a notation, a programming language, so that it can be executed by a computer.
Although many programming languages and many different types of computers exist, the important first step is the need to have the solution. Without an algorithm there can be no program.

Loops

Repeats a statement or group of statements while a given condition is TRUE.

for i in 2, 4, 6, 8
print (i)

Variable


variable can be used to manipulate values inside code.
total = 0
for i in 1, 3, 7:
total = total + i
print(total)

---

Challenge


Make a one line Python statement that uses both sum and range to print the sum of the numbers 1 through 10?
print sum (range (1,10))

---

Functions


```python def say_hello_to(name): print("Hello " + name) say_hello_to("Tyron") say_hello_to("Sara") ``` --- #### Conditional
```python angle = 5 if angle > 0: print("Turning clockwise") elif angle < 0: print("Turning anticlockwise") else: print("Not turning at all") ``` --- #### Module 3 Object Oriented Programming
Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.

#class

contains properties and methods

class pet()
	number_of_legs = 0
	
	def sleep(self):
		print "zzzzzzzzzzzzzzzzzzz"
		
	def count_legs(self):
		print "I have %s Legs " % self.number_of_legs
doug = pet()
doug.sleep()
doug.number_of_legs = 4
nemo = pet()
nemo.number_of_legs = 0
nemo.count_legs()