Introduction to Computer Programming Week 1 notes
Introduction to Computer Programming Week 1 notes CSE 1284
Popular in Intro to Computer Programming
Popular in Department
This 2 page Class Notes was uploaded by Miranda Williams on Monday September 5, 2016. The Class Notes belongs to CSE 1284 at Mississippi State University taught by Lisa Henderson in Fall 2016. Since its upload, it has received 6 views.
Reviews for Introduction to Computer Programming Week 1 notes
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/05/16
s= helpful commands and examples Bold & Highlight= Terms that you need to be familiar with Introduction to Computer Programming(CSE) Chapter 1: Storing Data in Python How computers store data: Bytes: a series of binary digits Each binary digit represents a switch. How a program works The central processing unit (CPU) only works with binary instructions and information. The CPU’s instruction set is a complete set of instructions for it. Fetch -Decode- Execute Cycle Fetch- a binary number, representing an instruction from memory to the CPU. Decode- the binary number to determine which operation the CPU should perform. Execute- is the process by which a computer or virtual machine performs the instructions of a computer program. Program File Is the directory name of a standard folder in Microsoft windows operating systems in which applications that are not a part of the operating system are conventionally installed. A program file is the first thing that you see when you open up Python’s file name. Save and Run the Program You have to save your code first and it can be run either by clicking run on the menu bar or it can be prompted using the f5 key after the program is written out. Process to make you successful using python Write down your design first. o It can be in the form of a flow chart. o It can be in the form of roman numerals Put the design into python language using input, strings..etc. Python sends this information to the CPU and prints the information on the screen. Interactive Mode (“Python Shell”) s= helpful commands and examples Bold & Highlight= Terms that you need to be familiar with This mode does not save your program; it only runs a program or functions as a calculator. Can be used to test variables before adding it to your program or it is an easy way to fix your mistakes The print statement in IDLE’s interactive mode To print anything to the screen you want to tell the computer how to do that with commands such as print. The print will be followed by parenthesis and a quotation, and end with closing quotation and parenthesis. Example: If you want to print your name it would be as follows in python. Python: print(“ your name”) How to make a new line automatically? Just simply add end= ‘’ to remove it. Example: print (“your name”,end= ‘’) Interacting with the Python Interpreter This can be done outside of Idle mode Steps to get there: o Start by opening a command window o Click the start button on your menu o Type cmd where it has search for programs and files o Press enter and then click on the cmd option Using the windows command change directory (cd) and change the directory to the file where your code is located. Most likely python.
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'