

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Quiz; Class: INTRO TO COMPUTER PROGRAMMING; Subject: Computer Science; University: University of Pittsburgh; Term: Unknown 1989;
Typology: Quizzes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Consider the following table. It has the translation from English letters to Morse code A .- B -... C -.-. D -.. E. F ..-. G --. H .... I .. J .--- K -.- L .-.. M --
Write a program that would allow the user to enter a sentence and display the entered sentence in Morse code. Then it allows the user to draw by entering the x and y coordinates as in the following
Please Enter a String lolo String LOLO in Morse Code is :
. -.. - - -. -.. - - - Do you want to draw?y Enter the x coordinate: 1 Enter the y coordinate: 2 Do you want to continue drawing? y Enter the x coordinate: 2 Enter the y coordinate: 2 Do you want to continue drawing? y Enter the x coordinate: 3 Enter the y coordinate: 2 Do you want to continue drawing? y Enter the x coordinate: 3 Enter the y coordinate: 3 Do you want to continue drawing? y Enter the x coordinate: 3 Enter the y coordinate: 4 Do you want to continue drawing? y Enter the x coordinate: 3 Enter the y coordinate: 5 Do you want to continue drawing? n This is what you drew: .......... ..-....... ..-....... ..----.... .......... .......... .......... .......... .......... ..........