Lecture 2.docx - Lecture 2 Introduction to Python Readings...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 2: Introduction to Python Readings 2.1-2.3 Objectives Use the terminal to explore directories Create and run a program from the virtual machine Design an algorithm to reproduce an image Implement that algorithm using pygame Flow Charts - Terminal symbols (ovals) appear at the top and bottom of the flow chart. The start terminal symbol marks the programs starting point, and the end terminal symbol marks the programs ending point. - Input and output symbols (parallelograms) represent steps in which the program reads input or output displays. - Processing symbols (rectangles) represent steps in which the program performs some process of data, such as a mathematical calculation. A function is a piece of prewritten code that performs an operation. Print Function >>>print(‘Hello world’) Enter Hello world >>> print(‘Kate Austen’) print(‘123 Full Circle Drive’) print(‘Asheville, NC 28899’) Kate Austen 123 Full Circle Drive Asheville, NC 28899 String literal mark where the string data begins and ends and is denoted as a ‘ or “ - Can also be used to surround multiline strings - Ex: print (“””One Two Three”””) One Two Three - Single or double quotes cannot be used for this
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The development cycle is the sequence of activities that should be followed during the create (and subsequent evolution) of a solution. - Can regard the cycle as a linear sequence in this course - Doesn’t run in testing phase go back to implementation phase. - Isn’t behaving the way needed go back to design. For testing phase the developmental cycle requires a terminal or command prompt - A command prompt is an entry point, allowing the user to perform tasks without using a graphical user interface. Typing “ python3 ” in the terminal will activate interactive mode , allowing you to run python statement one-at-a-time. - python3 ” – followed by a filename will run python in normal mode , executing all of the statements in the program contained in that file.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern