Applied Arithmetics - Functional Programming
Моля за съдействие - защо List-а не се променя както се очаква? Къде бъркам и какво пропускам? Как да се напише кода, така че да се промени List-а от първоначалните числа? Благодаря! Решението (което не работи) - https://pastebin.com/tRXYCBRf
Условието на задачата:
Write a program that executes some mathematical operations on a given collection. On the first line you are given a list of numbers. On the next lines you are passed different commands that you need to apply to all the numbers in the list:
- "add" -> add 1 to each number
- "multiply" -> multiply each number by 2
- "subtract" -> subtract 1 from each number
- "print" -> print the collection
- "end" -> ends the input
Use functions.
Examples
Input |
Output |
1 2 3 4 5 add add end |
3 4 5 6 7 |
5 10 multiply subtract end |
9 19 |
Absolutely perfect !!
I am glad to see this brilliant post, all the details are very helpful and useful for us, keep up to good work. Check Mapquest Driving Directions to finish your trip!
If you are seeking out an online stock marketplace route then NCFM Academy is simply the area you need to be. NCFM Academy is the great institute for NCFM, NISM, and Technical Analysis Course Training in Hyderabad. We additionally conduct unfastened seminars and a demo elegance for all the students. https://telegra.ph/AS-Chakravarthy-NCFM-Academy-Hyderabad-10-10 So earlier than you enroll in any of our publications, make certain to attend both the demo or the seminar. Join NCFM Academy today for the quality essential evaluation, technical analysis Options strategies, behavior analysis education publications.