130 likes | 361 Vues
Joseph Weizenbaum’s “Eliza”. Created a program that acted like a Rogerian therapist. Echoing back to the user whatever they said, as a question. It had rules that triggered on key words in the user’s statements. It had a little memory of what it had said before .
E N D
Joseph Weizenbaum’s “Eliza” • Created a program that acted like a Rogerian therapist. • Echoing back to the user whatever they said, as a question. • It had rules that triggered on key words in the user’s statements. • It had a little memory of what it had said before. • People really believed it was a real therapist! • Convinced Weizenbaum of the dangers of computing.
Getting parts of strings >>> helloStr = "Hello" >>> print helloStr[1] e >>> print helloStr[0] H >>> printhelloStr[2:4] ll H e l l o 0 1 2 3 4
Useful methods to use with lists:But these don’t work with strings • append(something) puts something in the list at the end. • remove(something) removes something from the list, if it’s there. • sort() puts the list in alphabetical order • reverse() reverses the list • count(something) tells you the number of times that something is in the list. • max() and min() are functions that take a list as input and give you the maximum and minimum value in the list.
Hypertext Markup Language (HTML) • A markup language adds tags to regular text to identify its parts. • A tag in HTML is enclosed by <angle brackets>. • Most tags have a starting tag and an ending tag. • A paragraph is identified by a <p> at its start and a </p> at its end. • A heading is identified by a <h1> at its start and a </h1> at its end.
HTML is just text in a file • We enter our text and our tags in just a plain ole ordinary text file. • Use an extension of “.html” to indicate HTML. • JES works just fine for editing and saving HTML files. • Just don’t try to load them!
Hexadecimal colors in HTML • #FF0000 is Red • 255 for red (FF), 0 for green, 0 for blue • #0000FF is Blue • 0 for red, 0 for green, 255 for blue • #000000 is black • 0 for red, 0 for green, 0 for blue • #FFFFFF is white • 255 for red, 255 for green, 255 for blue
HTML is not a programming language • Using HTML is called “coding” and it is about getting your codes right. • But it’s not about coding programs. • HTML has no • Loops • IFs • Variables • Data types • Ability to read and write files