CSci 1101 Lab 4. Due Friday Feb. 17th at 10pm
Reminder about sftp
This is just a reminder of basic sftp commands.
- Open a terminal window. If the files that you are editing are in a
directory other than your home directory, use
to switch to this directory.
sftp rynite at the command prompt, type in your
password when asked
cd public_html to get to your public_html
directory. If you want to get to a subdirectory of public_html, say,
lab3, you can type in
cd public_html/lab instead. To
create a new directory, type
mkdir lab (or any name you
want to give to the new directory), followed by
to get into the new directory.
- To upload a file to rynite, type in
filename (where you replace filename by the
actual file name).
- To download a file from rynite, type
- Note that the files are moved between your current directory on
the lab machine to the current directory on rynite. Some commands that
will help you orient yourself and move around in sftp, both on rynite
and on the lab machine:
For more commands type ? at the sftp prompt.
shows your current directory on rynite
shows your current directory on the lab machine
changes your current directory on rynite (
cd .. brings
you one level up)
changes your current directory on the lab machine (
lcd .. brings
you one level up)
shows your files in the current directory on rynite
shows your files in the current directory on the lab machine
quit or exit
Changing the loop behavior
- Copy the program loops.php from the lecture examples.
- Change all the loops so that they print every other number, for
1 3 5 7 9 11 13. Upload the program to rynite
and test it.
Write a program with a loop that generates a table with one row of
square cells with no text (set the width and height of the cells as an
inline style). Set the background of the cells to alternate between two
colors. The number of cells is a variable in your program. Hint: to
determine the cell color, use on if/else statement inside the loop to
check if the loop counter is odd or even.
Just upload the two files to rynite AND send me an e-mail with the
file names and locations.
This page is a part of CSci 1101
course web site.
The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.