User Tools

Site Tools


notes:datacomm

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) Due October 17th

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 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”, or “dits” and “dahs”, as in amateur radio practice.

How much functionality should the program have?

The program shall be able to recognize these letters:

  • [A-Z]
  • Comma: —…
  • Equals: -…-
  • Period (also called full stop): .-.-.-
  • Question mark: ..–..
  • AA new line (\n): .-.-
  • AR end of message (EOF): .-.-.

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). We shall 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:

  • $ ./encode «< “encoder” –> . -. -.-. — -.. . .-. .-.- .-.-.
  • $ ./encode «< “enc oder” –> . -. -.-. | — -.. . .-. .-.- .-.-.
  • $ ./encode «< “hello” –> …. . .-.. .-.. — .-.- .-.-.

decode ex:

  • $ ./decode «< “. -. -.-. — -.. . .-. .-.- .-.-.” –> encoder
  • $ ./decode «< “. -. -.-. | — -.. . .-. .-.- .-.-.” –> enc oder
  • $ ./encode «< “hello” | ./decode –> hello

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

Quote from our lord: “Accepting input from STDIN, sending results to STDOUT. That way we'll know if we have that logic in place, before we explore any other communication scenarios.”

If one desires, there is an opportunity to get some nice testing scripts up and going Yet another quote from our lord again: “Also, there are opportunities to write evaluation scripts and whatnot to really give our encoders/decoders a stress test to make sure they process information accordingly.”

EOCE

Well looks like the EOCE'S have been launched! May everyone do their best on it! Good luck to all :D

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/python3, so all you would need to do is make the file executable, and run it whenever you want to execute your program. Just a note, we have decided to use python3 for our programming adventures, so make sure that you are using that, and not python2.

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.txt · Last modified: 2018/11/15 01:07 by bstrong2