Download presentation
Published byMoses Atkins Modified over 9 years ago
1
Computer Languages Humans Computers How can humans “talk to”
Humans Computers How can humans “talk to” (instruct) computers? Answer: Computer languages (e.g., Java, C, Python, FORTRAN, Basic, C++, Lisp, Ruby, …)
2
Computer Languages Natural languages are often ambiguous.
Consider: “Alice and Betty had on the same dress.” Alice Betty Alice & Betty YES NO
3
Computer Languages Consider: “Alice and Betty ran from the same building.” Alice Betty Alice Betty NO YES
4
Computer Languages Natural languages contain a great deal of redundant
information, making them quite “fault tolerant.” It deosn't mttaer in waht oredr the ltteers in a word are, the iprmoatnt tihng is taht the frist and lsat ltteer are in the rghit pcale. Easy for a human to make sense of this despite 13 of the 27 words being misspelled.
5
Computer Languages Computers typically can’t tolerate ambiguity or mistakes. Statements (instructions) must be unambiguous and without mistakes. Computer languages provide framework for humans to communicate to computers in a way that is almost natural to humans.
6
Computer Languages Executable Compiler File Source File
Compiler int main() { printf(”Hi\n”); return 0; } Source File Two-step process to execute source code. Executable File Processor Output/Results
7
Computer Languages Source File Source code is Interpreter
executed directly. Interpreter print(”Hi”) Output/Results Interactive Environment We will use Python interpreter. Compilers better at catching errors and producing faster code. Interpreters better for developing code and learning to use a language.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.