User Tools

Site Tools


notes:datacomm

This is an old revision of the document!


Corning Community College

CSCS2700 Data Communications

Course Wiki Page

Projects

Hello, World!

Since our getting started plan is learning some python, generally the first project that you do is making the “Hello, World!” program, that is probably where we should start :P.

Morse Code Fun (Mcf0)?

morse code sender/receiver:

Alright, so at this point we should all have a decent understanding of how python works… So that means we can now start some dank projects bbbooii'ss!! The first project that we shall try is the morse code sender/receiver…

What is morse code?

The International Morse Code[1] encodes the ISO basic Latin alphabet, some extra Latin letters, the Arabic numerals and a small set of punctuation and procedural signals (prosigns) as standardized sequences of short and long signals called “dots” and “dashes”,[1] or “dits” and “dahs”, as in amateur radio practice.

Well okay what does this program need to do?

First thing we need to come up with a way to express our dits and dahs (that way we can use each others programs to encode/decode morse code). How about we use “.” for dits, and “-” for dahs. For spaces how about we use “|”… Open to suggestions on that :P. So our encoder should be able to convert text into the dits and dahs, and our decoder should convert dits and dahs to text.

encoder ex:

  • encoder –> . -. -.-. — -.. . .-.
  • enc oder –> . -. -.-. | — -.. . .-.

decode ex:

  • . -. -.-. — -.. . .-. –> encoder
  • . -. -.-. | — -.. . .-. –> enc oder

How much functionality should the program have?

This meaning should we only have the program go from A-Z or include special characters (things like ! , . /)?

Should we have the program accept the augments in argv, or use input?

This probably doesn't matter that much, but generally our lord has us use argv. So is using argv for the input okay with everyone?

Anything else that anyone can think of that this program should have?

URLs

Notes

How does one start programming on lab46?

There might be a different way, but this is what i'm doing… So if you add this line to the file that you intend to program in, then you're all good to start programming in thee dank python. #!/usr/bin/env python, so all you would need to do is make the file executable, and run it whenever you want to execute your program.

Another way to run a Python Program is to simply include the command python before your script.

python helloWorld.py

Other

I don't know if you want this posted in this section. Not to jump ahead of the “Hello, World!” starter, but i found a site with some python projects that are pretty cool. They are ranked based on their difficulty but also have the solutions on the right side. So if you get stuck you can see how they were done. https://www.practicepython.org/

Current things to look into

  • selection structures
  • Compound statements
  • if/else statements
notes/datacomm.1537482011.txt.gz · Last modified: 2018/09/20 18:20 by bstrong2