SKYQUEST's Posts
Nairaland Forum › SKYQUEST's Profile › SKYQUEST's Posts
1 2 3 4 5 6 7 8 9 10 (of 10 pages)
hustler2828:..at least this one get conscience. Do to others what you wish is done to you |
Collinsanele:HERE |
Collinsanele:lets have your solution sir |
Great job guys! Write a python program where python LOOKS FOR Total Assets and Total liabilities in the attached table and returns the value of the ratio of the two given variables as per their values in the table. |
String formatting Using the % format operator: Example1, >>> name = “Segun Oketade” >>>”The name of our branch manager is %s” %name “The name of our branch manager is Segun oketade” In the example above, the left side of the expression holds the format string while the right hand side holds a collection of values that will be substituted into the format string. The format string contains one or more conversion characters which tell the format operator what type of value should be inserted into the specified position in the string. Possible type specification include d, i (integers), f, e (floats), c (single character) etc Example2: >>> direction= “increment” >>> rate = 30 >>>”The %s in profit expected of the company was %d percent every year. Even if the %d was at a rate higher than %d percent, it would still have surpassed it.” %( direction, rate, direction, rate) ”The increment in profit expected of the company was 30 percent every year. Even if the increment was at a rate higher than 30 percent, it would still have surpassed it.” In the example above, there were four arguments in the tuple because there were four place holders for the format string. Using the format() method: The format() allow the use of simple placeholders for basic formatting. Example1, using default arguments (i.e. empty placeholders): >>>“Dear Mr. {}, your account balance is N{}”.format(“James”, 42000) “Dear Mr. James, your account balance is N42000” Example2, using positional arguments (i.e. index number of the arguments in the tuple) >>>“Dear Mr. {0}, your account balance is N{1}”.format(“James”, 42000) “Dear Mr. James, your account balance is N42000” Example 3, using keyword arguments (i.e. named indexes) >>>“Dear Mr. {firstname}, your account balance is N{amount}”.format(firstname= “James”, amount= 42000) “Dear Mr. James, your account balance is N42000” Example 4, using mixed arguments (i.e. mix of positional argument and keyword argument) >>>“Dear Mr. {0}, your account balance is N{amount}”.format(“James”, amount= 42000) “Dear Mr. James, your account balance is N42000” You will notice that the positional argument 0 was declared before the keyword argument amount. What do you think will happen if the declaration of positional argument is made after that of the keyword argument? |
hardeycute:what is the specific area of confusion? on your interest in data analysis, start with python and ice it with tableau or powerbi and sql; your knowledge of excel is an added advantage |
You are finding it hard because you are probably "cramming" the syntax like a formula. Syntax are like logic, one step leads to the other and if you know why something is so, you will understand what the next step should be . Besides, the only way to now how to code is to code everyday, not reading how to code everyday but to actually code everyday. Even when you forget what you did the day before just code it again and like driving coding will become natural with time! |
String Formatting String formatting involves the interpolation of objects inside a string. The interpolation is done using a placeholder placed within the string. The placeholder can be named indexes {cost}, numbered indexes {1} or empty curly braces placed within the string { }. String formatting can be done either through the use of: • % operator ( the arithmetic operator used in returning the remainder of division) • The format() method using the syntax: string.format(str1, str2, str3,….) Using the % format operator: Example1, >>> name = “Segun Oketade” >>>”The name of our branch manager is %s” %name “The name of our branch manager is Segun oketade” In the example above, the left side of the expression holds the format string while the right hand side holds a collection of values that will be substituted into the format string. The format string contains one or more conversion characters which tell the format operator what type of value should be inserted into the specified position in the string. Possible type specification include d, i (integers), f, e (floats), c (single character) etc Example2: >>> direction= “increment” >>> rate = 30 >>>”The %s in profit expected of the company was %d percent every year. Even if the %d was at a rate higher than %d percent, it would still have surpassed it.” %( direction, rate, direction, rate) ”The increment in profit expected of the company was 30 percent every year. Even if the increment was at a rate higher than 30 percent, it would still have surpassed it.” In the example above, there were four arguments in the tuple because there were four place holders for the format string. |
str () function This python built-in function returns a printable string representation of any object. It is able to convert any specified integer, float data type or generally any python data object into string object. For example, >>>print (“Total accounts opened by Operation Department is “ +10) This results in TypeError: can only concatenate str (not “int”) to str; “Total accounts opened by Operation Department is “ is a string; 10 is an int data type. By converting the number value 10 to string using the str() function enables the concatenation of string to string: >>>print (“Total accounts opened by Operation Department is “ + str(10)) >>> “Total accounts opened by Operation Department is 10” |
afuye:It's great doing the things you love! |
Strings Concatenation Merging or combining two or more string together to form a new string object is called string concatenation. This is done with the use of the operator “+”. >>>String1 = “Balance” >>>String2 = “Sheet” >>>String1 + String2 >>>”BalanceSheet” Or better still….. >>>String1 = “Balance” >>>String3 = “ “ >>>String2 = “Sheet” >>>String1 + String3 + String2 >>>”Balance Sheet” Mind you, if you concatenate string “23” and string “34” as in: >>>add1 = “23” >>>add2 =”34” # what you will have is >>>”2334” As against: >>>add1 = 23 >>>add2 = 34 >>> add1+add2 # which output >>>57 While “23” and “34” are string values, 23 and 34 are integers. |
afuye:What has the experience being like as a software engineer and what triggered the choice for a career change? |
String Operators In python, operators such as floor divisions (//), exponent(**), division(/) and modulus (%) are not used with strings. Addition (+) and multiplication (*) are however used. [] operator returns the character at a given index in a sequence: >>>Branch = “ Enugu” >>>Branch[1] = “n” >>>Branch[2] =”u” [:] operator fetches the characters in the range specified by the two operands as separated by the : symbol >>>Reprimand = “caution from hr dept” >>>Reprimand [12:15] >>>”hr” Note that the white space in the string Reprimand object is also at their individual index positions. in operator returns true if a required character exist in a string while the contrast not in operator returns true if a character does not exist in a string and vice versa. |
Playforkeeps:Your valid points are areas of concern |
Let us touch on few basic fundamentals of Python Programming: Data Types in Python Data types determine what kind of operation can be performed on a data. They are either numeric, non-numeric or Boolean. In python data types can be: 1. Numeric where they are either integer, float or complex numbers, 2. Boolean which takes True or False values, 3. Sequence type which is ordered collection of similar or different data types. Built- in sequence data types in Python are String, List and Tuples, 4. Dictionary which is an unordered collection of data in a key value pair form. To ascertain the data type of a value you are working with, a python in-built function, type() can be used. For example: >>> type(8033445566) >>>int >>>type(“CEO”) >>>str If you are working with a dataframe, to find the data type i.e. dtype of a column, DataFrame.dtype is used instead. Notably, objects created from any of the data types can either be mutable or immutable. They are immutable if after creation on the computer memory, they cannot be modified. If they can be altered they are otherwise known as mutable. Items in a list or dictionary for example can be deleted, added to or rearranged. Hence, list and dictionary are mutable. The content of number values, strings and tuples cannot be altered and are therefore immutable. |
I am a Chartered Accountant with over 12 years working experience across the banking, engineering and education niches. Somehow, I picked interest in programming with a view to expanding on my skills. I initially started with Java en route to Hadoop and Apache spark because of my interest in big data analytics. I must say that Java is a great programming language to play with, I was in love with it while studying it. However, I soon switched over to learning Python because of its more relevance to data science and its applicability to various domain of accounting such as finance, auditing, accounting, taxation and system accounting. I like to begin an expository journey with fellow accountants who may be showing interest in programming. Hopefully, I will get to receive inputs from programmers who may have one or two modifications to make on my presentations. Lets play! |
hybridblood07:if military are respected all over d world, is it not reasonable that they learn to treat civilians with respect and not always think they are some sort of demigod |
sunnyeinstein:This is the kind of argument we should be having in this forum; this how people become creative and inventive! |
If there are 10 oranges in a basket and 1 or 2 are bad, we'll say there are bad eggs in the basket; simply put the basket is made up of good oranges; on the other hand if there are 10 oranges in a basket and 9 are bad...then we just conclude that the basket is full of bad oranges. If there are 10 Nigeria police men or police stations in any sample you can be rest assured that the representation is made up of BAD police men or police stations. Give me one police station in Nigeria where they don't trade bail money like bags of tomatoes in Mile 12 market, show me one police man in Nigeria who you can say with 100% assurance that he has not sold his soul to collection of money from extortion, bribery, intimidation and the like. You hear of stories like the one posted EVERYDAY and you begin to wonder if we have a President, a pastor Vice President, a Council of State, National Assembly, leaders in authority who have responsibility to ensure orderliness and Justice; anyways, I am not surprise, how can you stop evil in a land when your soul and spirit is full of darkness. You can only give what you have. If Nigeria is a land of justice with a good structure and system, you cannot imagine how many Nigeria policemen would be in jail by now. This is Nigeria though, it is business as usual and they are still busy fighting corruption! |
Share some of the problem here, you might just get some free insights from guys around |
1. rule out infection 2. go natural, don't do drug 3. eat bitter cola regularly, roasted plantain with ground nuts or cashew nuts 4. replace your sugar with NATURAL honey 5. consume water melon daily 6. take lots of garlic and ginger often 7. always take at least a glass of water first thing everyday to detoxify your system 7. stay worry and anxiety free 8. the first round of sex usually does not last long for some people, monitor your improvement with the second or more round, not the first round 8. don't try to impress your sex partner during sex, just do your things and never feel embarrass or quilty after any sex round because the premature ejaculation will gradually fiddle out if you do these things religiously Best of luck |
I live in Nairobi but I travel 3 - 4 times a year so I do believe that I have some credibility to answer this question. Airport Murtala Muhammed International Airport (Lagos) vs. Jomo Kenyatta International Airport (Nairobi): there’s no comparison. JKIA is larger, cleaner and more organized than MMIA. The visa process in JKIA is also easier Weather Nairobi’s climate is mild and dry due to high altitude even though it straddles the equator (average is 23° / 14°). Temperatures in Lagos is hot and oppressively humid (average 32° / 24°) Power Most Nairobians do not own a generator because it is unnecessary. There are power blackouts but one of more than 4 hours is uncommon and maybe happens 1 - 2 month. Additionally, power is available in the lower income areas. Everyone in Lagos has a generator because power is off more than 50% of the time Fuel Nigeria is one of the leading exporter of crude oil but has to import diesel/petrol since their refineries are barely working. For various reasons, there are frequent stockouts of diesel and petrol although to be fair it has improved a lot in the last 2 years. Nairobi has not had a major petrol/diesel stockout in 5 years Rent In Nairobi, you pay first month, last month and one month deposit to move into a rental unit. In Lagos, you have to pay 2 years upfront Environment Lagos is a concrete jungle without a shred of greenery. Nairobi is the Green City in Sun with a lot of greenery and even a forest (Karura Forest) within the city limits Traffic Both Nairobi and Lagos suck equally Hotels Because Kenya has no oil, one of the major industries is tourism so there’s been a lot of investment in hotels and all levels. Most international chains have hotels in Nairobi. A few international chains have now a presence in Lagos (for a long time it was pretty much Eko Hotel) so this has improved. Road infrastructure Lagos does have better road infrastructure than Nairobi, although Nairobi is catching up with the building of the bypasses Food If you are a fan of spicy food and seafood then Lagos is the place to be. Nairobi food can be somewhat bland but this is a very subjective topic. I think there are more restaurants per capita in Nairobi since Kenyans eat out more than Nigerians. Nightclubs Lagos has many more higher end nightclubs than Nairobi and Nigerians dress up when they go out. Kenyans are very casual and frankly dress badly. It is common to find most people in a Nairoib club in jeans and sneakers whereas no self respecting Nigerian would roll like that to a club. One major cultural difference is that in Nairobi, women go to nightclubs by themselves or with their buddies and will entertain themselves and buy themselves drinks. This is for both single AND married women. In Lagos, it much less common for women (especially married) to go out by themselves unless accompanied by boyfriend/husband/brother. Also, a Nigerian woman will not pay for her own drink I hope you enjoyed the synopsis of Lagos and Nairobi. Edit: Ambrose Ukwuegbu asked me to add 16 other indices to compare Nairobi (Kenya) and Lagos (Nigeria). I’m not an economist nor an expert but I’ll give it a shot with 8 of the 16, Ambrose. Others are free to add to this. Note this is exercise is not to say which country but to compare in what areas each country can look to each other (or not) to improve itself. For example, I wish Kenyans would like at how Nigerians are proud of their country and culture and Nigerians can take an example of how a more diversified economy like Kenya’s would work for them. Corruption: both Kenya and Nigeria are equally bad. They are ranked 143 rd and 148th by Transparency International’s 2017 Corruption Index. Nigeria has been improving though since it used to be in the bottom 5, so it’s trending upwards whereas Kenya is either plateauing or trending downwards Strong Institutions: Kenya’s judiciary annulled a presidential election in 2017. Although I visit Lagos often I don’t live there so my view on this wouldn’t be an educated one. Transparency in doing business: according to the World Bank’s 2019 Ease of Doing Business Index, Kenya is ranked 61st and Nigeria 146th Patriotism and nationalism: this answer is anecdotal but Nigerians are far more patriotic and proud of their culture than Kenyans are. The are proud of their food, dress, movies, etc. They export their culture much more readily than Kenyans do. It helps that the population is 5 times that of Kenya but I still think the Nigerian culture is more exportable because it is more identifiable. The knock on Kenyans is that we just ape Western ways which I somewhat agree with Healthcare and welfarism: this is a complex topic because healthcare is complex. You can compare public health vs. private health and frankly I am not erudite enough on this topic Election rigging and selection: a lot of election rigging in both countries but my general perception is that it is getting better in both countries Judiciary and independence: the Kenyan Supreme court annulled a presidential election in 2017. They are becoming more and more independent but perhaps not as fast as Kenyans would like them to be. I do not know much about the judiciary in Nigeria Religious conflicts and dogmatism: Boko Haram vs. Al Shabaab. Boko Haram is the bigger threat since they are based within the borders of Nigeria whereas Al- Shabaab are mostly in Somalia. Also their aims are quite different. Boko Haram wants to establish its own country and hive off a chunk of Nigeria, whereas Al Shabaab basically wants Kenyans to keep out of Somalia. It's important to note that Boko Haram is much less of a threat in Lagos than Al Shabaab is in Nairobi. Nairobi has been a victim of several Al Shabaab attacks while I'm not aware of any Boko Haram attacks in Lagos. ...........by Fred Opere |
Mrmezico:This is the solution he needs, share it with him. When he stop worrying about premature ejaculation and he stop trying to impress you in bed, the issue will gradually take care of itself. Besides, let him take lots of vegetables and fruits particularly, plantain and citrus fruits. Take lots of water, garlic, some natural honey constantly and bitter cola regularly. Don't do sex enhancing drugs across the counter and from aboki, just go natural. Once again, constant sex is the best cure for premature ejaculation when you take note of my earlier points. |
Evil always trickle down. When the government behaves or make its citizen believe that it does not give a damn about the rule of law, the consequences trickle down to its agents. Quote me, worse case than this will CONTINUE to happen with the police because there is a CULTURE of impunity among the officers. You will ONLY behave well when you know there is a system that will DEFINITELY punish you for wrong doing. From the DSS to the police and other arms of the government, there is no consciousness that there are consequences for wrong doing, it is just business as usual. This is why the impunity will continue, extortion, bribery, falsification, torture and many more WILL continue in Nigeria. It is not about being pessimistic, it is the reality; Nigeria does not have a system. And more sad it is, because the people with that responsibility to give us that system are busy blaming their predecessors or are protecting their own interest. If the administration of President Buhari cannot deal with the high level of impunity in this country before leaving, he has failed the nation and he has failed himself. The mantle of leadership is on him now, he should take responsibility! |
ivandragon:The man called the line & suspected something funny because he knew the president's daughter was supposed to be out of the country. He knew the president daughter was out of the country and he still called the line----this is like 2+2=22 |
We should not allow this indiscipline to go unreported. The Nigerian Army is known for his high level of discipline and orderliness. Let well meaning Nigerians download that video and forward it to the Nigeria Army Human Right Desk whatsapp number 0 8 1 6 1 5 0 7 6 4 4. |
Nigerians cries for the enthronement of the rule of law is not about Sowore but about a better society, about ensuring that a system is in place which ensure that an innocent man, probably a nobody on the street of Lagos does not suffer for the wrong he never committed. This can only happen if due process is religiously followed by every man saddled with the responsibility of enforcing the law. If you can trample on the rights of Sowore, with all his pedigree, substance and the caliber of lawyers at his disposal, what will be the hope of a common man on the street who has no money or persons to fight for his right or freedom. The only process that will fight for him, “the innocent” is the adherence to the rule of law by law enforcement agents. If government agents destroy the rule of law and the government does not call them to order , then all hope for the common man on the street for a better life and freedom of expression is GONE. Forget every promise of good governance they promise us, it is all rhetoric. Good governance starts with taking responsibility for the enthronement of the rule of law as the President of a nation. It is not about Sowere, It is about the “nobody” innocent man on the street, who will one day may have to defend himself when accused. Who is the next victim of this lawlessness? |
sunene1:I think AIT is going to air the match |
This is one of the reasons why Tinubu has achieved more than Awolowo in the West |
Which cable operator is showing Brazil vs Nigeria friendly tomorrow? |
afuye:Chartered Accountant and a JavaScripter.....bross how you do amm? |
shiwex:....and are government road vehicle worthy, go through MBA road inward the same Mile 2 which marks the beginning of the journey of these articulated vehicle into Apapa, you will see how government is playing snooker with peoples' lives. You cannot move through that road without confessing your sins in case you don't make it through because of the these "containers " that have to drive through myriads of bad spot on that road. |
OP I'm confused with your code lines so far