Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   unsolved (http://www.velocityreviews.com/forums/t899661-unsolved.html)

sivasish 08-28-2006 11:56 AM

unsolved
 
hi any body can help me to write this program

Q.prompt the user to enter two strins of dna.concatenate the two
strings of DNA by appending the second to the first using ".="
operator. print the two strings as concatenated and then print the
second string lined up over its copy at the end of the concatenated
strings. for example
input string are
AAAAAA
TTTTTT
print as AAAAAATTTTTT
TTTTTT

i wrote the code for the first part but not able proceed further.i.e
how to print the above .


David Squire 08-28-2006 12:25 PM

Re: unsolved
 
sivasish wrote:
> hi any body can help me to write this program
>
> Q.prompt the user to enter two strins of dna.concatenate the two
> strings of DNA by appending the second to the first using ".="
> operator. print the two strings as concatenated and then print the
> second string lined up over its copy at the end of the concatenated
> strings. for example
> input string are
> AAAAAA
> TTTTTT
> print as AAAAAATTTTTT
> TTTTTT
>
> i wrote the code for the first part but not able proceed further.i.e
> how to print the above .
>


Hmmm. Looks like you were on about 5/10 for you assignment, but should
now be heading for 0/10 for cheating.

sivasish 08-28-2006 12:41 PM

hi
 
its nt like that . i am learning by my own without any tutor.so.. i
need help. please help me out


David Squire 08-28-2006 12:48 PM

Re: hi
 
sivasish wrote:
> its nt like that . i am learning by my own without any tutor.so.. i
> need help. please help me out
>


You need to start by helping yourself. First, learn how to use usenet.
For a start:

- Don't change the subject of a thread so that it has no relationship to
its original subject
- Quote context when you reply to a message (Your failure to do this,
along with the change of subject meant that I had no idea what this
message was about (until I remembered replying to you a little while ago
- most people here would have had no chance)
- Read the posting guidelines for this group (posted here twice a week)
and follow them when posting here. Most importantly, show us your code,
don't ask us to write it for you.


DS

Tad McClellan 08-28-2006 02:26 PM

Re: hi
 
sivasish <ssivasish@yahoo.co.in> wrote:

> please help me out



OK.

Here is some help:

Put the subject of your article in the Subject of your article!


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Tad McClellan 08-28-2006 02:26 PM

Re: unsolved
 
sivasish <ssivasish@yahoo.co.in> wrote:

> print the
> second string lined up over its copy at the end of the concatenated
> strings.



perldoc -f printf


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

John W. Krahn 08-28-2006 04:38 PM

Re: unsolved
 
sivasish wrote:
> hi any body can help me to write this program
>
> Q.prompt the user to enter two strins of dna.concatenate the two
> strings of DNA by appending the second to the first using ".="
> operator. print the two strings as concatenated and then print the
> second string lined up over its copy at the end of the concatenated
> strings. for example
> input string are
> AAAAAA
> TTTTTT
> print as AAAAAATTTTTT
> TTTTTT
>
> i wrote the code for the first part but not able proceed further.i.e
> how to print the above .


use warnings;
use strict;

print 'Enter the first string: ';
chomp( my $first = <STDIN> ):
print 'Enter the second string: ';
chomp( my $second = <STDIN> ):
print "$first$second\n";
$first =~ tr// /c;
print "$first$second\n";




John
--
use Perl;
program
fulfillment


All times are GMT. The time now is 02:24 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.