Hirdetés
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Hobby elektronika
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Házimozi belépő szinten
- AMD Navi Radeon™ RX 9xxx sorozat
- OLED TV topic
- Híres és hírhedt processzorokkal számol le az Intel
- Samsung LCD és LED TV-k
- Duplázik a NAND is: a Samsung 100%-os áremelésben gondolkodik
- Milyen Android TV boxot vegyek?
-
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!
- Intel I5-4670
- AMD Ryzen R5 5600X + Hűtő / Beszámítás OK!
- Dell XPS 9380, 13,3" UHD/4K Touch, I7-8665U CPU, 16GB DDR4, 256GB-1TB SSD, W11, Számla, 1 év garanci
- Dell XPS 9380, 13,3" UHD/4K Touch, I7-8665U CPU, 16GB DDR4, 256GB-1TB SSD, Új akku, W11, Számla, 1 é
- Eladó Konfig I7 13700K 32GB DDR5 1TB SSD RX6800XT 16GB!
- Új Kipsta agility 100 focicipő (43-as)
- Hario MINI MILL SLIM PLUS tekerőt keresek, mert elveszett
- Dell Latitude E7470. Olcsó üzleti kategóriás laptop! Új akkumulátor!
- Apple iPhone 13 Pro Max Graphite ProMotion 120 Hz, Pro kamerák 128 GB-100%-3hó gari!
- Dell Latitude 5440 - i7-1365U, 16GB RAM, SSD, jó akku számla, garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs



