Új hozzászólás Aktív témák
-
válasz
V.Stryker
#206
üzenetére
- Bekéred a változókat (váltási arány, vátás iránya, hány számot jelenítsen meg (n) a sorozatból, melyik legyen az első eleme (m), mi legyen a növekmény (q))
- legenerálod a forrás tömböt
- megcsinálod a váltást
- kiiratodAddig jáccottam, míg meg nem csináltam szép csicsásra

m = int(input("Start number of the range:"))
n = int(input("Count of range numbers:"))
q = float(input("Base of the range:"))
conv_rate = float(input("Conversion Rate:"))
conv_dir = int(input("Conversion (0* - EUR to CAD, 1 - CAD to EUR):"))
nm = range(m, m+n)
source = [pow(q,i) for i in nm]
dest = [i*conv_rate for i in source]
conv_s = '+ {0:^10} {2} {1:^10} +'
val_pack = {}
if conv_dir != 1:
conv_s = conv_s.format('EUR', 'CAD', '==>')
val_pack = zip(source, dest)
else:
conv_s = conv_s.format('EUR', 'CAD', '<==')
val_pack = zip(dest, source)
print ('+{0:-<13}+{0:-<13}+'.format('-'))
print (conv_s)
print ('+{0:-<13}+{0:-<13}+'.format('-'))
for (eur, cad) in val_pack:
print ('| {0:>10.2f} | {1:>10.2f} |'.format(eur, cad))
pass
print ('+{0:-<13}+{0:-<13}+'.format('-'))
Új hozzászólás Aktív témák
- Keychron egerek bemutatója
- Ingatlanos topic!
- Xiaomi 17 Ultra - jó az optikája
- Multimédiás / PC-s hangfalszettek (2.0, 2.1, 5.1)
- iPhone topik
- Kerékpárosok, bringások ide!
- Futás, futópályák
- Google Pixel Watch 3 - képpontos idő
- PlayStation 5
- Apple iPhone 15 Pro Max - Attack on Titan
- További aktív témák...
- HyperX Predator 2x8GB 3200mhz DDR4 ram CL 16 !!!! - RGB !!!!
- IdeaPad 3 15ARH05 15.6" FHD IPS Ryzen 5 4600H GTX 1650 16GB 512GB NVMe magyar vbill gar
- i7-8700K / ASUS Z370-E / GTX 1080 Ti komplett gép
- PNY GeForce RTX 4070 Ti SUPER 16GB XLR8 Gaming VERTO EPIC-X RGB
- Samsung Galaxy S25 eladó, független, garanciális (ses.hu, 2028 júniusig)
- AKCIÓ! LENOVO ThinkPad P15 Gen2 munkaállomás - i7 11800H 32GB DDR4 1TB SSD RTX A2000 4GB W
- Bomba ár! HP Dragonfly G4 i7-13G I 32GB I 512SSD I 13,5" FHD+ Touch I Cam I W11 I Garancia!
- ÚJ 16" Dell Precision 5690 - Intel Ultra 7, 16 mag, 32 GB RAM, 512 GB SSD, RTX A1000 6GB 27% ÁFÁS
- Apple iPhone 11 Pro / 64GB / Kártyafüggetlen / 12HÓ Garancia / Akku: 90%
- 236 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4090
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

