Python

Moderators: None (Apply to moderate this forum)
Number of threads: 477
Number of posts: 1160

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Python I don't even problem Posted by lemonhead71 on 31 Oct 2012 at 7:44 PM
I been looking over these two problems forever now and I still don't know how to solve them. Please help me, I need sleep. Thank you.



1. Write a program the accepts a sentence as input and converts each word to upper case "Pig Latin". In one version, to convert a word to Pig Latin you remove the first letter and place that letter at the end of the word. Then you append the string "ay" to the word. Here is an example:

English: I slept most of the night

Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY

Write functions and provide testing as per usual.

2.A 13 digit ISBN (International Standard Book Number) consists of the groups of characters:
A prefix of 978 or 979
the group identifier
the publisher code
the item number
a single check digit

Groups b, c, and d have a minimum length of 1, but may be longer. The groups of digits are separated by hyphens. Thus,

978-3-16-148410-0

is a valid ISBN number.

Write a Python function valid_isbn that takes a string as a parameter and returns True if the string is a valid ISBN, and False otherwise.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.