Our laboratory sessions are held in 112 Wright. For outside programming assignments, you may also use the computers in 339 Wright and 335 ITTC. These are the only computer labs on campus with the software development tools used in this course. The computers in these labs run both the Windows 7 and Linux operating systems. We will be using Windows 7 in this class.
To login in all these computers, you will use your CatID, the username and passphrase assigned to you by Information Technology Services (ITS).
Locate a free computer, if you are not already at one.
Now that you are logged on...
http://www.cs.uni.edu/~wallingf/teaching/cs1510/
You will find the rest of today's instructions there.
In order to keep your files for this course together, I strongly encourage that you get into the habit of saving your work on an external USB drive.
Let's take a quick look at the syllabus...
Our first major tool is the Python shell. It is part of an integrated development environment (IDE) called IDLE.
"hello, world!" 1 1 + 2 1 + 2 * 3 print("hello, world") prin("hello, world")
From now on, when I say
Enter the following expressions.this means
Enter the following expressions one at a time, each followed by return. Think carefully about what you see.
Now let's use the Python shell to grow a program.
import math math.pi r = 4 2 * math.pi * r circumference = 2 * math.pi * r circumference math.pi * r ** 2 area = math.pi * (r ** 2) area input("Enter the radius of the circle: ") r_string = input("Enter the radius of the circle: ") r_string 2 * r_string int(r_string) r = int(r_string) r print("circumference = ", circumference) print("radius = ", r)
Our second major tool is the IDLE editor.
## FILE: circle.py ## AUTHOR: <your name> ## DATE: 08/27/2014 ## COMMENT: Compute the area and circumference of a circle. ## This code is adapted from Code Listing 1.1 in the text. import math r_string = input("Enter the radius of the circle: ") r = int(r_string) circumference = 2 * math.pi * r area = math.pi * (r ** 2) print("circumference = ", circumference) print("radius = ", r)
Congratulations! You have run your first Python program.
Make sure that your responses file and program file are complete and saved. Now, let's submit your files for grading:
Uploading the following files. circle.py of size 417 bytes responses.txt of size 716 bytes The files listed above were uploaded. You are responsible to make sure that this list is complete. You may replace or add file up until the deadline by using this system again...
If you need any help, let me know.
Congratulations! You have completed your first computer science lab.