CS : Computer Programming, Spring 2000 Programming Project #1: Thinking of a Number Due in class Thursday 27 January 2000

Similar documents
CS : Programming for Non-majors, Spring 2003 Programming Project #1: Thinking of a Number Due by 10:20am Monday January

CS : Programming for Non-majors, Spring 2018 Programming Project #1: Thinking of a Number Due by 10:20am Wednesday January

Introduction to Using OSCER s Linux Cluster Supercomputer This exercise will help you learn to use Sooner, the

CMSC 201 Spring 2017 Lab 01 Hello World

Introduction to Unix CHAPTER 6. File Systems. Permissions

CMSC 201 Spring 2018 Lab 01 Hello World

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

Using the Zoo Workstations

Intro to HPC Exercise

commandname flags arguments

CS Computer Programming in Fortran 90 & C

Lab 1 Introduction to UNIX and C

Lab 1 Introduction to UNIX and C

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Unix. 1 tblgrant projects 0 Jun 17 15:40 doc1.txt. documents]$ touch doc2.txt documents]$ ls -l total 0

Goals for This Lecture:

CSC 112 Lab 1: Introduction to Unix and C++ Fall 2009

CS1600 Lab Assignment 1 Spring 2016 Due: Feb. 2, 2016 POINTS: 10

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

CS 300. Data Structures

CS4023 Week04 Lab Exercise

Chapter-3. Introduction to Unix: Fundamental Commands

CSC209. Software Tools and Systems Programming.

Welcome (back) to CS1007!

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

1 Getting Started with Linux.

Unix Filesystem. January 26 th, 2004 Class Meeting 2

CHAPTER 1 UNIX FOR NONPROGRAMMERS

Oxford University Computing Services. Getting Started with Unix

The Unix Shell & Shell Scripts

User Guide Version 2.0

9 and 11-Jan CSCI 4152/6509 Natural Language Processing Lab 1: FCS Computing Environment, SVN Tutorial. FCS Computing Environment, SVN Tutorial

Lecture # 2 Introduction to UNIX (Part 2)

UNIX Quick Reference

CS Fundamentals of Programming II Fall Very Basic UNIX

last time in cs recitations. computer commands. today s topics.

Linux Exercise. pwd answer: We call this directory (into which you get when you log in) your home directory.

CSCI 4152/6509 Natural Language Processing. Lab 1: FCS Computing Environment

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

UNIX File Hierarchy: Structure and Commands

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Laboratory 1 Semester 1 11/12

Operating Systems, Unix Files and Commands SEEM

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

: the User (owner) for this file (your cruzid, when you do it) Position: directory flag. read Group.

LAB 0: LINUX COMMAND LINE AND SVN

Introduction: What is Unix?

Practical Session 0 Introduction to Linux

Getting started with Hugs on Linux

You should see something like this, called the prompt :

Protocols. Module UFCE Topic: Protocols and More HTML

Python lab session 1

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

CS CS Tutorial 2 2 Winter 2018

Getting Started With UNIX Lab Exercises

Intermediate Programming, Spring Misha Kazhdan

Temple University Computer Science Programming Under the Linux Operating System January 2017

CSC209. Software Tools and Systems Programming.

15-122: Principles of Imperative Computation

AN INTRODUCTION TO UNIX

EECS 211 Lab 2. Getting Started. Getting the code. Windows. Mac/Linux

Saint Louis University. Intro to Linux and C. CSCI 2400/ ECE 3217: Computer Architecture. Instructors: David Ferry

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

UNIX Quick Reference

Physics REU Unix Tutorial

LAB #5 Intro to Linux and Python on ENGR

Introduction to Unix: Fundamental Commands

CSC111 Computer Science II

Introduction to the UNIX command line

CS 2400 Laboratory Assignment #1: Exercises in Compilation and the UNIX Programming Environment (100 pts.)

Exploring UNIX: Session 3

Helpful Tips for Labs. CS140, Spring 2015

Contact No office hours, but is checked multiple times daily. - Specific questions/issues, particularly conceptual

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Getting started with Hugs on Linux

Introduction to Linux Environment. Yun-Wen Chen

Refresher workshop in programming for polytechnic graduates General Java Program Compilation Guide

Exercise Sheet 2. (Classifications of Operating Systems)

Unix File System. Class Meeting 2. * Notes adapted by Joy Mukherjee from previous work by other members of the CS faculty at Virginia Tech

Spring 2017 Gabriel Kuri

Introduction to the Linux Command Line

Unix Workshop Aug 2014

Intro. To Unix commands. What are the machines? Very basics

UTA Tech Orientation Spring 2019

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

SECTION -C. Getting Started with UNIX

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

CSC 101: Lab #1 Introduction and Setup Due Date: 5:00pm, day after your lab session

CSCI 2132 Software Development. Lecture 4: Files and Directories

Once you have installed MobaXterm, open MobaXterm. Go to Sessions -> New Session, and click on the SSH icon.

Lab Assignment #1. University of Pittsburgh Department of Electrical and Computer Engineering

An Introductory Tutorial on UNIX

LAB 8 (Aug 4/5) Unix Utilities

Unix Tutorial. Beginner. CS Help Desk: Marc Jarvis (in spirit), Monica Ung, Corey Antoniuk 2015

Traditional Access Permissions

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

/23/2004 TA : Jiyoon Kim. Recitation Note 1

The Unix Shell. Permissions

Transcription:

CS 1313 010: Computer Programming, Spring 2000 Programming Project #1: Thinking of a Number Due in class Thursday 27 January 2000 For online help check the class website http://www.ecn.ou.edu/cs1313010/ You can get help with this assignment during your Friday lab sessions. This first assignment will help you learn to use the Engineering Computer Network (ECN). A personal account should have been set up for you automatically, but if you have trouble accessing your account, you should talk to your TA or e-mail hneeman@ou.edu by no later than Friday January 21. You must be enrolled in the class to get an account. The requirements for this assignment are: 1. Log on to your personal account. You can do this in a couple of ways: (a) Log on via a PC in Carson 206 or one of the other ECN labs. Your account name is your OU 4+4 username; your password should be your OU mail account password. (b) Log on via your laptop s wireless connection. 2. Connect and log on to a DEC Alpha running the Unix operating system, either: (a) Via QVTNet: Start -> Internet Utilities -> QVTNet Connect to host ecnalpha.ecn.ou.edu (b) Via Telnet: Start -> Run, then type telnet ecnalpha.ecn.ou.edu You should get a prompt for your username and password, something like this: Trying 129.15.112.37... Connected to ecnalpha.ecn.ou.edu. Escape character is ^]. Digital UNIX (vinson.ecn.ou.edu) (ttyp0) login: neeman Password: noneofyourbusiness [invisible] Once you log on, you ll get a page or two of information, and at the bottom will be a Unix prompt, probably a percent sign, with the cursor after it: %

3. Create a subdirectory called CS1313, like so (all commands should be followed by pressing the Enter or Return key): % mkdir CS1313 4. Set the permissions on your CS1313 directory so that only you can access it: % chmod u=rwx,go= CS1313 Your CS1313 directory is now accessible only to you. 5. Go into your CS1313 directory: % cd CS1313 All of your programming projects should reside in your CS1313 directory. 6. Aside: to learn more about a particular Unix command, type: % man commandname For example, % man chmod will give you the online manual page for the chmod command. 7. Copy the Fortran 90 program mynumber.f90 from Dr. Neeman s home directory to your CS1313 directory: % cp ~neeman/mynumber.f90. 8. Confirm that you have mynumber.f90 in your CS1313 directory by listing the directory s contents: % ls mynumber.f90 9. Using the text editor of your choice (e.g., pico, vi), edit mynumber.f90: % pico mynumber.f90 (a) In the comment block at the top of the file, change the author name, lab section and time. (b) Change the values assigned to minnum, maxnum and mynum. You can select any integer values you want, as long as minnum < mynum < maxnum. (c) Change the following output strings to your own words: i. Hey! That s not between ii. That s amazing! iii. Close, but no cigar iv. Bzzzt! My number was 10. Compile the program: % f90 -o mynumber mynumber.f 11. If the program doesn t compile, you ll need to edit it and figure out where things went wrong. In the worst case, if you re totally stumped, go back and copy the original from Dr. Neeman s home directory again, and start editing from scratch.

12. Once you have the program compiled, test it: 5 That s amazing! 13. If the program doesn t run, you ll need to edit it and figure out where things went wrong. In the worst case, if you re totally stumped, go back and copy the original from Dr. Neeman s home directory again, and start editing from scratch. 14. Once the program compiles and runs properly, start a script: % script mynumber.script Script started, file is mynumber.script 15. List the contents of the directory, using the long listing -l option: % ls -l -rwxr-xr-x 1 neeman faculty 32768 Jan 12 19:44 mynumber -rw-r--r-- 1 neeman faculty 2258 Jan 12 19:43 mynumber.f90 16. Output your program: % cat mynumber.f This will cause the contents of mynumber.f to be sent to the terminal screen. 17. Compile your program: % f90 -o mynumber mynumber.f 18. Run it, choosing the following values: (a) An integer value less than minnum or greater than maxnum (b) An integer value between minnum and maxnum (inclusive), but far from mynum (c) The integer value one less or one more than mynum (d) The value of mynum It ll look similar to this: 0 Hey! That s not between 1 and 10! 2 Bzzzt! My number was 5.

6 Close, but no cigar; I had 5. 5 That s amazing! 19. End the script by typing Control-D (hold down the Ctrl key, and while holding it down press the D key): % ctrl-d Script done, file is mynumber.script 20. Check to make sure that you have a file called mynumber.script: % ls mynumber mynumber.f90 mynumber.script 21. Print your script file: % lpr -P<printername> mynumber.script but replace <printername> with the name of the printer you want to print to, which you can find on the sign attached to that printer. Laptop users: if you want to print the file at home, you ll have to download the file to your laptop s hard drive. 22. Using a word processor, text editor or typewriter of your choice, create a cover page with the following information: (a) Project number and name (b) Course number, name and semester (c) Author name and student ID (d) Lab section, day and time For example: Project #1: Thinking of a Number CS 1313 010: Computer Programming, Spring 2000 Sandy Lee 123-45-6789 Lab Section 013 Friday 2:30pm 23. Print up a brief summary of the project and of your results, in your own words. 24. Bind the cover sheet, summary sheet, and all pages of the script printout with at least an adequate staple. No paper clips, duct tape, brightly colored yarn, etc.

Notes You will use this same process for every programming project in this class. Since your programming projects are 55% of your grade, each one is worth over 5%. You ll want to do them all. You are expected to keep a copy of your source code and your script file on your ECN account through the end of the semester. Do not delete either file! If something goes wrong with your printout, those files will be your only proof that you ve done the work. We urge you to go to your lab session every week. Your TA will be happy to help you with your programming projects. You can get help with Unix, laptops, software and so on from: http://www.ecn.ou.edu/helpdesk/