Search code, repositories, users, issues, pull requests...
Provide feedback.
We read every piece of feedback, and take your input very seriously.

Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications
CECS 475 lab assignment 3
TannerLow/Lab-Assignment-3
Name already in use.
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI .
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.

Latest commit
Lab-assignment-3, contributors 2.
LAB ASSIGNMENT 3
sqlite3 3.37.2
Embed on website
- Toggle navigation

- Portfolio Profile
- Lab Assignment #1
- Lab Assignment #2
Lab Assignment #3
- Lab Assignment #4
- Lab Assignment #5
- Lab Assignment #6
- Lab Assignment #7
- Lab Assignment #8
- Internships
- Achievements
Description In this assignment, I will follow the steps on how to build a Pig Latin translator from Codecademy’s Python section. Pig Latin is a pseudo-language that is used by English-speakers who wants to disguise their words from non-Pig Latin speakers. The rule is to take the first consonant of an English word, move it to the end of the word and use the suffixes ‘ay’. If the word begins with a vowel, add ‘way’ at the end. For example, Pig becomes igpay, banana becomes ananabay, and aardvark becomes aardvarkway. Below are the instructions I followed in Codecademy.
Break It Down 1. Ask the user to input a word in English. 2. make sure the user entered a valid word. 3. Convert the word from English to Pig Latin. 4. Display the translation result.

Ahoy! (Or Should I Say Ahoyay!) Print the phrase “Pig Latin” on the screen.

Input! 1. On line 4, use raw_input(“enter a word:”) to ask the user to enter a word. Save the results of raw_input() in a variable called original. 2. Click save & submit code. 3. Type a word in the console window and press enter.

Check Yourself! 1. Add an if statement that checks that len(original) is greater than zero. Don’t forget the : at the end of the if statement! 2. If the string actually has some characters in it, print the user’s word. 3. Otherwise (i.e. an else: statement), print “empty”.

Check Yourself… Some More Use and to add a second condition to your if statement. In addition to your existing check that the string contains characters, you should also use .isalpha() to make sure that it only contains letters. Don’t forget to keep the colon at the end of the if statement.

Pop Quiz! Take some time to test your current code. Try some inputs that should pass and that should fail. Enter some strings that contain non-alphabetical characters and an empty string.

Ay B C Create a variable named pyg and set it equal to the suffix ‘ay’.

Word Up Inside your if statement: 1. Create a new variable called word that holds the .lower()-case conversion of original. 2. Create a new variable called first that holds word[0], the first letter of word.

Move It On Back On a new line after where you created the first variable: Create a new variable called new_word and set it equal to the concatenation of word, first, and pyg.

Ending Up Set new_word equal to the slice from the first index all the way to the end of new_word. Use [1:len(new_word)] to do this.

Testing, Testing, Is This Thing On?

CODE pyg = ‘ay’ original = raw_input(‘Enter a word: ‘) word = original.lower() first = word[0] new_word = word + first + pyg new_word = new_word[1:len(new_word)] if len(original) > 0 and original.isalpha(): print new_word else: print ’empty’
- Write a brief paragraph to introduce yourself to your visitors and explain what they will find on this site. Be sure to add more developed content to your About Me page. (Edit this paragraph in Dashboard > Widgets > Text)
- Search for:
Learning Blog Archives
Recent posts, the openlab at city tech: a place to learn, work, and share.
The OpenLab is an open-source, digital platform designed to support teaching and learning at City Tech (New York City College of Technology), and to promote student and faculty engagement in the intellectual and social life of the college community.

New York City College of Technology | City University of New York
Accessibility
Our goal is to make the OpenLab accessible for all users.
Learn more about accessibility on the OpenLab
Creative Commons
- - Attribution
- - NonCommercial
- - ShareAlike

© New York City College of Technology | City University of New York

IMAGES
VIDEO
COMMENTS
Some possible sources of errors in the lab includes instrumental or observational errors. Environmental errors can also occur inside the lab. Instrumental errors can occur when the tools are not functioning exactly as they should be.
Like all Labrador Retrievers, chocolate labs have an average life expectancy of 10 to 12 years. Black is the most popular color for these dogs. Chocolate brown is second, followed by yellow labs.
Are you looking to upgrade your lab equipment or simply get rid of the old ones that are no longer in use? Selling your used lab equipment can be a great way to recoup some of your investment and make space for new and improved tools.
will be deducted for each week delay after the first due date and time. ... this assignment if you don't
A negative correlation between the two variables is demonstrated as those with lower educational attainment believes that women are not suitable for politics
Lab Assignment 3 - Introduction To Data Communication Systems Lab · 1. Create file called “index. · 2. Using sftp, copy the file to your public_html directory
Given Triangle struct (in files Triangle.h and Triangle.c), complete main() to read and set the base and height data members of triangle1 and of
Write a script called MakeFunction which creates a function named: CreateDir.The function when called should accept a new directory name as a command line
CECS 475 lab assignment 3. Contribute to TannerLow/Lab-Assignment-3 development by creating an account on GitHub.
LAB ASSIGNMENT 3 · Copy link · Download · Share on Facebook · Share on Twitter · Share on Reddit · Embed on website.
Lab Assignment #3. PIG LATIN. Description In this assignment, I will follow the steps on how to build a Pig Latin translator from Codecademy's Python section
1); each time you draw the world, you'll overlay all the shapes on the list. Each shape will contain a posn (a two-number structure) that
operations. ... Select Any Doubly Linked List Operation! ... Select Any Doubly Linked List
Lab Assignment 3 You need to implement a unique function (append_new_list) that appends a new list to the end of a list of lists. This function