- Information
- AI Chat
Was this document helpful?
Revision Bootcamp Notes
Course: Computer science1015 (CSC1015F)
257 Documents
Students shared 257 documents in this course
University: University of Cape Town
Was this document helpful?
BASIC PROGRAMMING
Theory/Terminology
-Program – “a set of instructions given to a computer corresponding to an
algorithm to solve a problem”
(see first lecture notes)
-Program Structure
Input
X=eval(input(“Enter a number:”))
Files
Arrays
Processing
Loops, calculations etc
Output
Print()
Files
First principles
Built-in Python function vs First principles
e.g Sentence is “Hi my name is Sani”
Sentence=input(“Enter a sentence”)
Reverse=Sentence[::-1]
Print(Reverse)
For k in range(len(Sentence),-1):
Character = sentence[k];
CompSci BootCamps