Hirdetés
- E-book olvasók
- Kormányok / autós szimulátorok topikja
- Milyen belső merevlemezt vegyek?
- Befutott a peronra a hardvervonat
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Házi barkács, gányolás, tákolás, megdöbbentő gépek!
- Milyen monitort vegyek?
- Bambu Lab 3D nyomtatók
- Gaming notebook topik
- HP notebook topic
-
PROHARDVER!

Új hozzászólás Aktív témák
-
Zola007
veterán
Ezt meg lehet rövidebben vagy kevesebb változóval oldani (Perl 5.24)?
#!/usr/bin/perl -w
# Write a program that switches two bases in a DNA string at specified positions.
# Get the name of the file with the DNA sequence data
print "Please type in the sequence need to be modified: ";
$DNA = <STDIN>;
# Remove the newline
chomp $DNA;
# Get the base would like to change
print "Please type in which positions would like to switch?\n";
print " This position: ";
$pos1 = <STDIN>;
print "\n to this one: ";
$pos2 = <STDIN>;
# Remove the newline
chomp $pos1;
chomp $pos2;
# detect the bases at given positions to be modified
$base1= substr $DNA,($pos1 - 1),1;
$base2= substr $DNA,($pos2 - 1),1;
# change the bases among each other
$swap = substr $DNA,($pos1 - 1),1,$base2;
$swap = substr $DNA,($pos2 - 1),1,$base1;
print "The modified sequence is ",$DNA;
exit;
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- iPhone Xr 64GB 100% ÚJ EREDETI AKKUMULÁTOR Gyűjtői darab (3hónap Garancia)
- AKCIÓ! Intel Core i9 13900K 24 mag 32 szál processzor garanciával hibátlan működéssel
- Kingston FURY Beast 64GB (2x32GB) DDR4 3200MHz KF432C16BBK2/64 RAM
- REFURBISHED - Lenovo ThinkPad 40AF Dock (DisplayLink) (2 4K felbontás)
- Apple iMac 21,5" 2015 Late / 8GB DDR3 / 1TB HDD / Bill+Egér 6 hó garancia, számlával!
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest


