Mae'r ddau i'r ddau hwyc oeddi'r ddau hwyc. Yr ddau i ei ffordig yn fwyaf o ddau ei ddau i'r ddau ddau, a ddau i ffordig yn ddau i'r ddau i'r ddau a ddau i gael gwiaith oedd yn ni'r cyflwyno i'r ddau yn rathau? Ond yr unrhyw ffordig yn gwneud mwy gynnwys maen nhw, maen nhon gyda'r ffordd aethau mewn amser i gyflodau yn gallu gyflodau yn periogiadau ar gyfer mwygau ac i perpetuol. Mae eich ddigon ni'n ddarparu, maen nhon i wych gwaith, ac yn y penderfynol, ond mae mae hefyd yn hawdd weaving. Yn 2015, ac yw 6 weithiwch, mae fylwch yn cyffredig. Dysgol 2015 i gyrdau, yn 2016, mae hi'n оes i gael mwneud rhai rhai i gael, yn gyfrifio ar gyfer y ddewis, yn gyfreistiau'n gyfrifio ar 5, over 45 years, and the D in Ballot are over 87 years. SIPA recorded over 50 new record river levels across Scotland, and in many cases, those were exceeded by substantial margins. The scale of the events was exceptional, but so, I believe, was the response to protect our communities. The collective efforts of our responders working very closely together were first class. The timing of Storm Frank could not have been worse with communities and responders planning for the new year, a period of festivity and hope. For communities like Ballot are, which I visited on Hulmanay and Newton Stewart visited by the First Minister and the Environment Minister, it was far from festive and hopeful. While seeing a terrible start to the year, they continued to demonstrate a strong community spirit. The Scottish Government resilience room was actively engaged in the situation throughout, with frequent ministerial resilience meetings to ensure that all the Scottish Government and its agencies could do was being done to support. We heard first hand reports from the national police and fire services demonstrating the benefits of the new structures, including getting special support such as the water rescue craft quickly from one part of the country to another, and providing relief to local teams who had been at the heart of the initial responses. The first class response was greatly aided by the planning and preparations supported by forecasts from the Met Office and SIPA. These allowed preparations to be undertaken, and resources stood up in advance of their immediate requirement. Their forward look also allowed good planning to respond to needs, ensuring that individuals and teams were not strained too heavily in the process. Local authorities were at the heart of the efforts to respond, putting in place immediate defences and where required setting up rest centres. It was a concerted effort involving a whole range of functions, flooding social care as well as emergency response. Their efforts were based on a substantial foundation of preparation, response and recovery, and I want to recognise their achievements in what were very challenging circumstances. Whilst the efforts of local authority staff and emergency responders were critical and deserve recognition, I should also highlight the role played by third sector organisations and communities. None of us will fail to be impressed by the spirit that was endured in many of those communities and the particular example of firefighters who put to one side their own concerns about their own properties as to flood risk to support their local communities. Communities have joined together to deal with both the response and now the recovery, and I pay tribute to all involved in this process. We will review recent events with the aim of learning lessons to help in future emergency responses. This is regular practice following a score activation, with officials and responders reviewing the circumstances of the event to identify lessons learned, which are acted upon to provide a continuous improvement regime. Ultimately, the learning identified is captured and utilised to review and improve the delivery of response and recovery actions by statutory organisations, voluntary agencies and central government, and provide the best possible service to our communities, as was seen by the tremendous joint efforts to tackle issues arising from the winter storms. The Government has also been quick to respond to the move from response to recovery. On each occasion we have been quick to activate the bellwins scheme, it was triggered on 7 December 2015 as a result of storm Desmond and on 30 December 2015 as a result of storm Frank and remains active in the aftermath of the latest severe flooding. The Scottish Flood Forum, financially supported by the Scottish Government, has been swift to offer local support and advice. On 16 December, I announced as part of the budget statement the allocation of £4 million Barnett consequentials to support those affected by storm Desmond. Last Thursday evening and Friday morning, we saw some very significant impacts in the north-east of Scotland. As those latest communities dealt with the immediate clear-up on Saturday, the First Minister announced a further round of support totaling £12 million. The key elements of the package are as follows. First, they provide funding to local authorities to allow them to make payments of £1,500 for households, businesses, charities and community groups affected by flooding. That would be paid from allocations made to local authorities by the Scottish Government. If a local authority did not receive an allocation, it can seek recompense from the Scottish Government to make such a payment, ensuring that any individual in any part of Scotland can receive support if they have been affected by flooding. Secondly, a flat rate grant payment of £3,000 to businesses in any part of Scotland, where there is evidence that their ability to trade has been severely impacted by flooding at the beginning of January. The grant will be a one-off payment to offset costs that cannot be covered by existing insurance, for example, clean-up costs, materials and exceptional costs to help the business to restore trade, such as marketing and promotion. That will be funded by the Scottish Government in addition to the local authority allocations. Thirdly, the Scottish Government will make available £5 million to assist in reinstating infrastructure that has been lost due to recent flooding. A specific allocation will be made to Aberdeenshire Council to support the reinstatement of the A93 between Ballotir and Breymar. The exact sum will be dependent on discussions with the local authority. Further bids from local authorities are now invited. Finally, the Scottish Government will open an agricultural floodbank restoration grant scheme, which will be available to the farming community to seek financial support to restore damaged floodbanks. The total available will be up to £1 million. Further discussions will take place tomorrow between the Cabinet Secretary for Rural Affairs, Food and the Environment, SEPA and the National Farmers Union of Scotland to discuss how we are effectively involved in supporting the farming community in managing those conditions. The Government has made those announcements as swiftly as possible after the conclusion of the weather events. That ensured that all partners maintained a clear focus on resolving the emergency situations and enabled us to gather a picture of the scale of the events to give clarity about the financial support that could be provided. Today, the infrastructure secretary is writing to the United Kingdom Government, asking them to make an application, as the member states, to the EU solidarity fund. The solidarity fund was established after the severe flooding in central Europe in 2002. Payments can be made to help emergency operations to deal with non-insurable damage such as salvage operations, repair of infrastructure and cleaning. Applications can only be made by member states. The UK received £162 million after the 2007 floods, but so far has declined to make an application in relation to recent flooding. We are asking that they now do so, as an application may well provide additional and welcome funding to local authorities to deal with the impact of the past few weeks. December 2015 was the wettest on record. Climate change brings the likelihood of even more frequent severe weather events. It is important that we are prepared, and to that purpose in 2009, this Parliament approved the Flood Risk Management Act. Yesterday, the Minister for Environment, Climate Change and Land Reform launched our first ever flood risk management plan and 14 local strategies. Those set out investment plans of over £235 million in 42 flood protection schemes, protecting over 10,000 properties. That national plan allows us to target investment and coordinate actions that will reduce flood risk. The strategies contain measures such as natural flood risk management, where it is appropriate, as well as initiatives such as flood warning and community engagement. It is a culmination of a number of years of work to identify current flood risk. It sets a clear agenda for action over coming months. The strategies have been developed collaboratively, they are not static plans, they will continue to be informed by the work undertaken by SIPA and other bodies, overseen by the Cabinet Sub-Committee on Climate Change, to ensure that our approach adequately addresses the latest climate change projections. SIPA provided excellent technical support and advice in informing those plans and worked closely with local plan partnership teams. The public were also engaged before the strategies were finalised. The strategies set the framework for the first six-year planning cycle. In June, the local authority-led partnerships will set out the detailed plan of action, providing additional local detail on delivery between 2016 and 2021. This massive programme demonstrates the seriousness of which this Government takes flood risk and the steps that we are taking to reduce that risk across Scotland. As a Government, we are committed to investing in flood risk management and investment in the future. The recent budget identified the need to maintain future investment in flood protection schemes and protected support for flood warning and forecasting. Recent events have shown the importance of that. In conclusion, I want to repeat the Government's appreciation for those involved in the front-line response to protecting communities across Scotland from recent severe weather events. We recognise that flood risk management is a long-term priority, we are committed to reducing the risk, we have put in place a framework to deliver improvements and we are working to ensure that investment continues to be made available to support delivery across the country. The Deputy First Minister will now take questions on issues raised in his statement. I intend to allow around 20 minutes for questions, after which we will move on to the next item of business. It would be helpful if members who wish to ask a question of the DFM would press the request to speak, but now I will see about it. I thank the Deputy First Minister for her advance copy of his statement. I also wish to echo the Minister's comments about the huge effort that there has been to help people through the floods and the immediate aftermath. I particularly welcome the commitment to a review of the emergency response, but we would specifically ask that the issue of flooding equipment in communities at risk being available to the fire and rescue service is addressed across the whole country. I also support the reference in the Deputy First Minister's statement to the suggestion that there is a UK bid to the EU solidarity fund. I think that that makes a huge amount of sense given the severity of floods that communities have experienced across the country. I repeat my view that I believe that we need a proper formal review going forward. The Deputy First Minister finished by reassuring us that the money needed was there for flood defences and that there were local strategies in place, but surely what the last events of the last fortnight tell us is that the extreme and more unpredictable weather conditions that we are now experiencing will cause devastation to local communities and businesses. Although SIPA estimates the annual cost of flooding to be in the region of £250 million, the cost of the last fortnight is estimated at being over £700 million. I would like more detail about the £235 million that the Deputy First Minister referred to and exactly what it will buy. My understanding of the scheme that he has referred to is that it has not all been tendered, so we do not know the final outcome bills for those schemes and whether they will all be affordable. We also need to know the timescales. It is suggested in today's statement that we are not going to have that information until after June this year. Can the Deputy First Minister clarify that? Importantly, it is clear having looked at the schemes and SIPA's flood prevention strategies that even if all the schemes were being suggested were built, there will still be whole communities, many communities that will not be affected by those flood defences and that there will be tens of thousands of households that will not be protected. Last week, the First Minister told me that she did not want to run into you. I am not asking for that. I am not asking for that. Apologies, Presiding Officer. Surely we need to look at future flood mitigation and resilience for our communities and infrastructure and that that is done urgently. I hear what Sarah Boyack says on those issues. I welcome what she said in relation to the EU funding point and also on the flood equipment issues that have been looked at in the light of the experience that we have had. Those are part of the operational reviews that will be undertaken. In relation to the remainder of her question, I am at a bit of a loss to understand what she wants the Government to do. We set out on an orderly process that was activated by an act of Parliament passed in 2009, which required us to produce flood risk management strategies. We have now done that, they have been published, they were launched by the environment minister just on Monday and they cover the length and breadth of the country. In some cases we will require us to undertake some investment in flood protection schemes of the type that we are just completing in Selkirk where the minister was on Monday or which were completed some years ago in the city of Perth that I represent and which have proved to be money extremely well spent. In other circumstances they will be about working with nature to utilise the advantages of nature to be a component part in our flood risk management strategy. That work has been done and the Government is now focused entirely on implementing those strategies to provide the maximum amount of protection that we possibly can do to people in those circumstances. I say that that is right. There will be instances of acute weather intensity that will affect different parts of the country. When I was in Balotar on Hugmanay, not one single person said to me that a flood defence scheme could have protected Balotar because the scale of the event was of such a magnitude that no design scheme would have managed to do that. What there is a requirement to do is to look at catchment areas exactly as the flood risk management strategies do to identify what cumulative actions can be taken to provide the maximum amount of protection and that is what the Government is focused on implementing and taking forward. Those strategies have been informed by the best available research and we will continue to update that research, as I indicated in my statement that we will do. Finally, on the issue of funding, the Government has made available £42 million as part of the local government finance settlement to support flood prevention schemes in Scotland. That money has been used across a range of different areas. It has been used in the city of Elgin to provide schemes in forests, in Selkirk and in Brechen. Indeed, in both Selkirk and Brechen, where the schemes are just half built, they have provided essential protection to the communities involved. That commitment, the commitment of the Government to maintain that funding over the duration of the period to 2020, has been assured by the commitment that I have given to local government that it will command 26 per cent of the capital budget available to the Government over the period to 2020, which is an extension of the time, the commitment that I previously given to local government. The resources are there for us to work with local government to introduce the flood risk management strategies that have been carefully prepared in advance of their requirement. Alex Ferguson, up to a minute. I am grateful to the Deputy First Minister for the copy of his statement. I would entirely endorse the sentiments that he expressed on the professional and voluntary services that rose so wholeheartedly to the occasion in the wake of the recent devastating floods along with the communities involved. The First Minister's announcement on Saturday was very welcome, although I believe that it was a statement that should surely have been made to Parliament before it was made to the media. There are, however, many questions that arise from it and from this statement today. Can the Deputy First Minister confirm that the £4 million of consequential funding that he announced on 16 December will not be made available to local councils till the end of March, and if that is the case, will he fast-track it? Will the Government work with SEPA to ensure that communities such as Carsthern in my constituency that has now been flooded three years in a row and yet is not recognised by SEPA as an area of potential vulnerability? Will he ensure that communities like that are fully taken to account within the flood risk management plan that was announced yesterday because currently they are not? Finally, as we begin to look at how better to deal with future flooding, will the Government undertake to look at prophylactic measures where appropriate to slow down the flow of water from our hills and forests before they get into the river system rather than something that is being increasingly successful in all parts of the UK, which has proved to be much more economic and efficient than the purely reactive building of barriers in towns and cities once the water is actually in those systems? First of all, I have seen a bit of traffic over the course of the last two days that the money that I announced in December will not be available until March. I suspect that that has come from the letter that was issued on 17 December to local authorities, which indicated that the money would be paid through the local government settlement as a redetermination and paid out in the last two weeks of March 2016. If this is where the source of this particular piece of poorly analysed information, it does not say very much about the knowledge of local government finance determinations because, on a constant basis, ministers make announcements in this Parliament, and the statutory allocation of the money, the actual parliamentary approval, might not come until a redetermination order at the end of March, but it does not stop local authorities spending the money. There is absolutely no issue about local authorities having to wait until the end of March for their money. I have announced in Parliament that the money is coming. If that is not good enough for a local authority, then the whole system of local government finance in every other respect, because I have a list of different other schemes here, whether it is the council tax reduction scheme or the teachers' induction scheme or the free school meals or the looked after children policy or the discretionary housing payment system, all of which were paid out to local authorities by the same means, and it did not stop local authorities paying out the money. I do not know what people are thinking about on that particular point. On Mr Ferguson's second point, I have a lot of sympathy with his point about the efforts to try to slow down water as it comes down straths. I think that there is a substantial conversation that has to be had, and we are already embarked on that conversation with the agricultural community and with land use interests, about the various components that can play a part to try to retain as much water as possible in the hills before it ends up in coastal communities and in the river routes through our country. Indeed, if the temperature had been a bit lower, most of the rain that fell in my constituency would still be in the Grampian hills, in the Grampian mountains, and we would be having a fabulous skiing season into the bargain, but it was not thus. There is a substantive discussion that thinking is implicit in the flood risk management strategies, and it will continue to play a part in the discussions that we have with the agriculture and rural interests about how we can best utilise the natural resources of Scotland to provide flooding protection. As members would expect, I have a large number of questions, so I ask that you keep your question as short as possible. In that way, I will allow everybody who has an interest to get in. Joe McAlpine, followed by Elaine Murray. The people of Dumfries and Galloway in my region welcome the FFM's announcement of £1 million for the region in addition to the £700,000 allocated in December. However, the Labour Council in Dumfries and Galloway refused to let people know about the £1,500 grants available to them in December until yesterday, and they still claim that they have no money to distribute until March, despite the Deputy First Minister's explanation today and the fact that they have considerable reserves and unspent revenue from this year. The council also claimed that the December money is restricted to victims of storm desmond, but I can reveal today that victims of storm desmond in Dumfries failed or told that there were no grants available to them last week. Does the Deputy First Minister agree with me that— Please sit down, Deputy First Minister. In my answer to Mr Ferguson, I went through length the issues that I have been communicated in this. I have made an allocation of money, and the statutory force of that will be applied later on in the French year. However, the money is available to be spent, and there should be no impediment to be allocated to individuals who require that support. I was interested that the cabinet secretary repeated the assertion that councils should pay out now. I suggest that instead of asking cashstrap councils to make payments on the basis of an IOU from the Scottish Government, the Scottish Government should make payments as soon as possible to councils in order to assist them in assisting hard-pressed households and local businesses. I am at a loss here. Dr Murray is a former Minister of the Scottish Government who knows how local authority finance works. Every week, we pay money to local authorities, every single week in life. A cash payment is made by the Government to local authorities. If Dr Murray is trying to say to me that I'm freezing Galloway Council is so hard-pressed, he can't find £1,500 this week to pay out to somebody because they have no other money available, local authorities are sitting on £1.8 billion of cash reserves that can be used to support cash management, and they know and they know fine well that it's not an IOU. They know fine well that I have given a commitment in a redetermination that that money will be paid. Now, Dr Murray is a Galloway Council. She should just pay up to the people that we've allocated to the money and stop finding excuses. Mark McDonald called by Travis Scott. Thankfully, many homes in my constituency were spared the impact of the dawn flooding. However, Dice Jr's football club in my constituency has seen their home pitch severely flooded, perimeter fence damaged and facilities in their clubhouse suffering significant damage as well. While the announcement around cash available to community groups is welcome, I wonder if the Deputy First Minister would advise whether the local football club would fall into such a category. We might reflect on what future support might be available for the club given the significant damage that is being caused to their ground to enable them to continue to fulfil fixtures at the earliest possible stage. We've said that the £1,500 payment can be made to an individual, to a business, to a charity, to a community group. I hope that that definition is broad enough to take in organisations of the type that Mr McDonald has raised. Of course, it will be for individual judgments to be applied at local level as to the eligibility that will be set out. However, we believe that that is a broad enough guidance to give to individual authorities to enable them to determine what sort of ventures can be supported. As for longer-term support, organisations have access to a whole range of different provisions that can assist them in ensuring that their grounds can be rehabilitated. However, what the Government is trying to do is to provide early cash support that can enable organisations and individuals to get back on the feet after what has been a very serious set of circumstances. I thank the Deputy First Minister for his statement. Would he agree to review the Bellwin plan, given the concerns that have been expressed by councils across Scotland, not least in his own area? Secondly, when he mentioned the welcome letter to the UK Government with respect to the UK Solidarity Fund, he also said that there had been some previous discussions. Could he tell Parliament what they might have been and what his reading of why the UK Government seems to be so reluctant to apply to that particular fund, given the good that it would do to Scotland? I will certainly look at the Bellwin scheme. I will be very surprised if there is not a successful Bellwin scheme claim out of the events of the past few weeks, because I should clarify to Parliament that I will be judging claims not on a storm Desmond basis, but separately on a storm Frank basis. I shall be looking at that entire period, which I think is only reasonable in the circumstances to consider the flooding damage that has been done. On the issue of the EU Solidarity Fund, as I indicated in my statement, the United Kingdom Government has been a beneficiary of this in the past, in 2007, quite understandably. It represents the type of fund for which we contribute on an on-going basis as part of the financial contributions that member states make to the European Union. It is important that, when we require that support, we make propositions to approach that. There would obviously be a benefit also to communities in England, because there was severe damage in the north of England and the bargain. I have no insight knowledge as to what is in the thinking of the United Kingdom Government, but I encourage them to embark on an application to try to receive some of that support, which would be a benefit to us and to local authorities. Can I ask the Deputy First Minister to confirm that I have already had discussions with him about flooding that has taken place in the city of Stirling, Aberfoil, Calender and wider Stirling area in the past couple of weeks? Does the Deputy First Minister agree that it is now urgent that people who are affected and who qualify for a grant as householders or business find the money in their accounts as soon as possible? Do that end, what positive discussions have taken place with local authorities to ensure that they put in place arrangements necessary to ensure that as many payments of grants as possible can be achieved? We are obviously communicating with local authorities about the arrangements. As I have explained already to the Parliament, there are no impediments to that money being available and for it to be financed by local authorities. The particular circumstances in Stirling, the properties and businesses that have been affected in Stirling are across quite a range of different geographies within the communities involved. For that reason, I took the decision because there will be isolated properties in local authorities that have not been influenced by the allocations that I have made to make a facility available to local authorities who have not got an allocation to make payments and for them to seek recompense on the Scottish Government so that no individual in any part of Scotland who has been flooded in this recent event in any way loses out from the process. Will the Deputy First Minister agree to consider further R&D funding for the development of integrated catchment management, recognising as he does the link between upland management and downstream flooding to better protect our towns and villages? Will he and colleagues in this context consider increasing SRDP funding to support new initiatives, for instance, for the new co-operation fund for joint strategy implementation? The Claudia Beamish will be familiar with the fact that there is provision within the agriculture support scheme to encourage and motivate a greater use of—well, a greater attention towards this element of our thinking in the approach to agricultural management. As I said in my statement, the rural affairs secretary will meet the National Farmers Union who has expressed their enthusiasm to be participants in what is an important discussion. If I think about the area that I represent, if agricultural land had not retained the volume of water that it retained, there would have been much more significant implications for urban communities and I am profoundly grateful to the farming community for the way in which that was handled. In relation to the research question, Mr Lockhead will, of course, have a regular dialogue with the research institutes who are active on this question, and I am sure that the points that Claudia Beamish raises can be reflected in that thinking into the bargain. Can I first associate myself with the comments of the Deputy First Minister with regard to the work of the councils, emergency services and the army of volunteers? Deputy First Minister visited Ballotar and was very much aware of the situation in Ballotar, and I welcome the announcement of the monies available for the repair of the road between Ballotar and Brimar. My constituency between the D and the Dawn has been affected quite significantly. Can the Deputy First Minister put on record a mechanism for people to make applications for compensation, and will those be on the Scottish Government website? The most important thing is that there is a ready means for individuals to make themselves known to local authorities to secure that financial support. We are encouraging local authorities to make that information available to them. Clearly, the priority is to make sure that we can provide that practical assistance to individuals and to provide it in a fashion that meets the needs of individuals who have been affected by what is a very serious set of circumstances. To that, can the Deputy First Minister confirm that the allocation of funding to local authorities will fully fund the £1,500 payment that is intended for households in the relevant council areas and confirm that there is no expectation or requirement that those payments should be means tested in any way? On the first point, I would be staggered if the money that I have allocated does not meet all of the requirements of the £1,500 payment in all local authority areas. However, if local authorities can provide evidence to me that that is not the case, I will consider that evidence. In relation to the question of means testing, I do not intend to apply any means testing to the process. Hoik's flood prevention plan has been prioritised as number 16 out of 42 plans in the pipeline for the next five years. SEPA has identified 683 residential properties and 283 businesses at risk of flooding in Hoik. However, looking at the plan, 15 plans above Hoik on that list, all but two affect a smaller number of properties. Given the scale of the damage caused last month in Hoik, will the Scottish Government give consideration to give greater priority to the hoik flood scheme? As Mr Lamont will appreciate, as individual schemes take their course, there are a whole variety of different tests that have to be passed, not least of which is the whole planning process and design process. I would say to him not to attach too much rigidity to the order in which schemes emerge. There is a priority to ensure that the funding support is in place to be used to ensure that schemes are taken forward as timely as possible. I know from the evidence that it has been marshaled in relation to the scheme in Hoik that the significance of the benefits of all that will be considered as part of the decision-making process. In Caithness communities such as Hall Curtain stacks ago near Wick, we are not considered to be flooding hotspots but flooded due mainly to excessive surface water. One of the cabinet secretary can say that, in the medium term, while the rolling flood management plans reassess areas previously considered low risk for investment, in the short term will the Scottish Government encourage local authorities to review drainage and culvert maintenance to cope with much heavier surface water flooding? On the last point, there is a lot of substance in what Mr Gibson says. One of the biggest issues that has been faced by the nature of the last element of storm damage has been the enormous volumes of surface water because of a prolonged period of heavy rain. That puts enormous pressure on the drainage systems that we have in place and they may not all be designed to cope with that volume and capacity. It is important that, around the country, first of all that the drainage systems are well maintained because good maintenance regimes can help in that process. We also consider areas where improvements to the drainage system may make a significant amount of difference. It is an issue for us to take forward at local authority level because the issue of surface water is a particular impediment in the effective flow of water and in the alleviation of some of the difficulties that can be experienced. That ends the statement by the Deputy First Minister. My apologies to the two members that I was unable to call. The next item of business is a debate on motion number 15282.


quation changes so hopefully in the time quality they might ask even five questions also 15 questions and how the questions could be okay fine next i'll tell you like no how you have to kind of see those questions well i'll give you a list of topics how you should prepare like no you make a note of this topics people so how many number of questions like no have you written it already how many number of questions were asked have you so just list on the questions like no generally how many number of questions like no cross check with it so 2011 there are 11 questions quality questions uh 2012 it was 19 that includes partly governance also some overlapping questions also not exclusively quality okay 2011 11 questions 2012 it is 19 1 9 2013 it is 18 2014 it was 12 2015 it was 14 and 2016 it was what uh 2015 i said no 2015 is 14 and 2015 16 is 5 and 2017 is 22 18 it's 14 19 also 14 20 it is 16 21 it is 18 22 it is 10 i'll repeat i'll repeat the you see the pattern like 11 19 18 12 14 5 22 14 14 16 18 10 so how much this could be this year could be let it be like whatever it is but i'll tell you one simple thing here it is now whatever the questions can be every time the questions could be easier tough based on what uh in in the questions we have seen that right people last year for those people like no here are those people who have kind of answered uh i mean who have attended kindly tell me like which is kind of easy for you which is difficult for you last year listening yeah now was this question easier difficult it was a easy question medium you can eliminate it for a strong statement eliminated first easy question so how the graph will be like how the lines go so first one the easy question hi all right what is the question certainly if i i'll tell you like how exactly it works as it's fine if i normally uh uh you you you also take it people and then again the questions what is going on 2000 you have written right 2022 wait i'll show it to you so how it will be your mindset mentality will be able to go so first question on the it started from if this is the line say say moderate this is say this is easy this is moderate this is say difficult so first question was like what easy the second question was what it's this kind of difficult question certainly a difficult question so suddenly again a difficult question next part easy this is again an easy question again it goes through next is it a far medium it's easy it's an easy question because why i say it's an easy question because we have written in the notes also you have studying let's make on the also all right again it is an easy question next easy questions next two questions easy easy easy next year it's kind of medium i can keep it it's it's a kind of medium i can keep it well it's so this is a kind of a medium question all right this is a medium question after that like now they've come here as it's fine next year speaker question like was there any doubt as it's fine any people have a doubt in that all right so mostly it can be like no it can be call us again easy and last is also easy so definitely either graphically so most of the questions definitely will be easy only you take the questions 2015 questions i'll show that also you take this 2015 questions how many if you got it wrong right you only know that so you only know that like now how many of your questions you got it right which question was easy people which question was tough you tell me wait tell me so first question was easy or tough or this question was easy or tough i don't know you tell me how you felt it the moderator easy okay fine all right i'll write it okay first it was easy add the next question next question was about uh what easy yeah class this was a this was a difficult question because as i said it is not taught in the class also i'd not teach maybe other people other academies would have taught it but i'd not teach it and it is not there in lakshmi count also so that is the reason i keep it difficult and third question gram nihilist also it's kind of medium as it's like no because of the first statement like no you can kind of there is a logic you can kind of answer it but still medium to difficult only this question question number 95 and 500 maybe like no you can keep it as this is medium and then another easiest okay this is how it will be so none of these questions in each subject will be in a proper standard format one question will be very difficult one question so accept that and leave the questions even if you belong to geography optional so if some geography questions are like no tough accept and leave it it's not just for me it is really tough for everyone so your success lies in leaving this question and answering these questions this is the first keeping you have to keep in mind okay now apart from that like no where you have to focus what what is the topic wise breakup i'll tell you all right when the topic wise breakup quickly what is the topic wise breakup so i've kind of given made some um how many topics i've made i just made a minute okay some 20 topics or 21 topics okay first topic is historical evolution historical evolution so approximately how many questions were asked in the last 12 years 12 years much from 2011 to 2022 okay two questions just two questions so that means it is one of the least important so it's overlapping geography sorry history so what is the source only one source Lakshmi can't alone factual purely factual secondly very importantly well-standard insight if you want to revise only you have to revise don't read it now this is only for revision people now don't go and read it maybe for next year you can keep it if you have not already read please don't read it we already written i mean well-standard history team number three positive chapter framing of the constitution framing of the constitution sorry secondly historical evolution than second chapter i've kept it as basics of quality basics just basics not basic structure basics this basics i've included what righto next federalism parliamentary form of government this is something you have studied as salient features no and the salient features time given as basics mukima especially parliamentary form of government federalism and other basics include last time like i said no custody question they say they asked no about advocates other things some things like miscellaneous topics but mostly you have to focus on two things federalism and parliamentary form of government very frequently asked okay how many questions did i say 16 questions 16 questions what is the source now your class notes n crt and lakshmi can't third these questions will be mostly based on your understanding on the democracy's superior virtualize in the fact liberty question is the limits part of this one you have to especially the political theory book you have to and of course current affairs lakshmikanth you keep it as last as i find next one preamble next heading is chapter is preamble eight questions of course there is an overlapping but okay and the eight questions how they asked of being repose so where you have to study if you have notes like no so far as like the students of shankal like no we have notes like they've not like no study lakshmi can't because preamble there is no dedicated chapter in ncr if class notes you can follow class notes and then like no lakshmikanth and ncr because there is no such kind of next chapter is union sanjay it's online lirka pa next chapter is union union and its territory union and its territory not even one question very simple topic not even one question that you can kind of refer to lakshmikanth that's fine class notes and lakshmikanth that'll be fine and if people wanted to you can kind of go for ncr again ncr especially 11 standard not 11 standard 12 standard politics in india since independence politics in india since independence first chapter that you'll be studying in the post independence consolidation also how the states joined state reorganization either later only they can ask in the first thing up and up next heading chapter number five historically evolution basics preamble union citizenship so last 12 years only one question and that too because of ca but not related to ca very simple question just only one question so for citizenship okay lakshmikanth like no for citizenship lakshmikanth and what you should not read it is the dates okay now which which they entered so what should be date and the qualifications whether like no the mother or father should be there or not all these things not required so concentrate on that like no whenever from from from the union chapter whatever you read it have the barrack with you cross check with the barrack if desiring the barrack give first importance if not going to leave it citizenship you can kind of skip all those things and all fine next one fundamental rights fundamental this is one chapter which is more important than rather than problems 13 questions primarily ncrt notes ncrt especially two chapters in ncrt ninth standard democratic chapter and 11th standard rights political theory also there is a rights chapter 11th and 2x book spa political theory book rights chapter is there icw also rights chapter is there these three chapters as well as like no lakshmikanth if you want you can study that but mostly based on current affairs remember hadya's case putta samy's case mostly based on current affairs they'll be asking it okay at the dpsp next is dpsp 14 questions dpsp is 14 questions again the same order ncrt lakshmikanth like now i can keep it and next is fundamental duties lakshmikanth and by heart the bar at all all the 11 duties by heart it very easy nothing more than that lakshmikanth will be suffice for that but some questions are asked remember that correlation other than tricky question question and understanding from ncrt all right fine how many questions are questions four questions one of four may i'll run the easy two was tough two very easy four questions only amendment amendment does all four questions lakshmikanth 11 standard constitution as a living document 11 standard icw constitution as a living document constitution as a living document so next legislature very important in fact the more legislature means includes union legislature also state legislature also do a comparative study study parliament all the chapters then state legislature 32 questions 32 questions that is the reason why we spend more time learning that the class rules 32 questions in films main source equally important more than half okay for people of shankar class nodes will be more than surface give importance to so whenever you're studying legislature class nodes bar at then ncrt ncrt you have no legislature chapter 9 standard also 11 standard also at last one the lakshmikan other points in lakshmikan very optional only unless you study this one you don't study for it okay next executive executive includes whom president avangala 17 questions prime minister president vice president and all 17 questions are the same format whatever you study for legislature same format only our class nodes same judiciary 14 questions 14 questions again the same nodes ncrt lakshmikanth there is a chapter 11 standard and also nine standard center state relations center state relations next study four questions mostly questions will be from legislative relations when can parliament can make a law in the state list other things and mostly in that exceptionally in finance relations and the sales tax and all okay only four questions not many but study about interstate council and the 262 river valleys and all next is local self-government only five questions but local self-government prior to 2010 so many questions they used to ask it but after 2010 very less only but they're asking questions in mains okay four questions uh this you keep lakshmikanth first priority lakshmikanth then ncrt local self-government lakshmikanth then ncrt ncrt also there is a dedicated chapter study those committees in local self-government every committee is not required if you study that will be good for like no other public service commission examinations also but for plumes much you better avoid it not not much but some committees have been mentioned in ncrt kindly go through that okay next chapter is elections so direct questions about elections they've asked only four questions election chapter ncrt is also you write the study first 11th standard election chapter first then you study lakshmikanth first priority to barrett first priority to barrett provisions okay out of the emergency just two questions just lakshmikanth will be fine so what are you supposed to see studying lakshmikanth the emergency what is the period within how many how much time it has to be approved who can approve who has to approve who has to uh who can revoke all those things what are the amendments made in 44th next is ut is unit territories not even one question as of now no direct questions but they've asked question in mains okay ut is again lakshmikanth with barrett so next special status special status and schedule five schedule six special status and schedule five schedule six special status nine other three seventy three seventy one all those things are not and schedule five schedule six how many questions in total very frequently asked is uh schedule five only five questions lakshmikanth will be fine five questions bodies constitutional bodies and statutory bodies seven questions mostly focused on finance commission mostly focused on finance commission constitutional bodies so sources what lakshmikanth that is also like now clearly given lakshmikanth with barrett will be fine comparative constitution two questions what is the source there is no such kind of source whatever you study in ncrt you'll be able to do that no need to study separately anything else is comparatively rights issues if you take rights issues separately almost some seven questions which i have not discussed my some of the questions like no so that is based on the rights consumer rights human rights green environment rights all these questions it can be there is an overlapping so there is a mixture of questions also some 10 questions one statement they'll ask from legislature one statement they'll ask from executive okay so this is how so how many topics in total people 21 all right fine so now what happens so give priority to these i mean which are the questions which is most asked okay fine next what is the like two things you have to do before studying after the examination hall what you're supposed to do with this will i'll wind up all right so first next one week of preparation scheme of preparation is what every day dedicate one day for one subject before the next mock so from morning till afternoon first previous question paper next whatever the tests which you already taken pre-storming pre-fit or whatever the things revise that question for me evening wherever you made a mistake like now all those things you take your notes standard textbook which is referred by your country answer faculty go through that this is your routine practice number two don't study anything new all right enough is enough let it be no don't study anything new number three keep your biological clock perfect from now on no night makeup all right 9 30 to 11 30 every single day 234 30 you have to refer only to questions preferably afternoon if you want to take like no all those questions like no see that you can take it if not at least quality related or subjects like the respective subjects so every day from today till 28 9 30 to 11 30 don't sleep don't sit idle prepare your clock by this clock 9 30 now i have to answer it because your mind will be sharp you know the difference definitely in among the solving it definitely you'll tell after the examination or it was very good in solving it definitely works all right so please try that number three next fourth try to attend the test as it's like if you're kind of at home also switch off the phone for the night back to that to us okay morning whatever it is important please don't do that keep if you're in the home like no have a separate home if it is in the home it is just coming to study hall or come to our academy whatever it is allows them to kind of leave you can kind of study they won't be kind of opposing so please do that this is what so after studying examination hall what are things you should not do you should do i'll tell you the first things before next week kindly go and see the school in a school government so that'll be confusing often like no people used to kind of like no jump from one school to another school recently in the need also one girl kind of went to a wrong school like no police like no they kind of dropped in in the car but that won't happen to us because once it happened to me but i was not so late it happened in Delhi but not everyone is so good enough to kind of do this one all right first one second all right go to the examination hall or a half hour before preferably go with your parents because i don't know like no because some people are laughing i don't know what is the reason why they are laughing as such all right go with your parents i said like why i said no so basically like you can take your food also and definitely when your parents are there they'll make you kind of calm and like no not to be tensed because if your friends know what you start discussing the questions that is the reason or that is the only thing okay and in the examination hall one more thing like no expect the worst possible invigilator worst possible invigilator worst possible classroom like no the the tables will be kind of like no not so good fan work are they fan won't be working expect the worst because it will happen sometimes sometimes you may be lucky you'll get the best of the infrastructure best of the invigilator also i even told you once in the class also one of the invigilator came like no this was a similar get up like i made no i i have given a different picture like him but i shaved my head and then went in upc then the initiator started looking here like no is it not this is not you this is not you second time she made it and suddenly the squad came and they also saw that i got really disturbed for two minutes i went to diana like no what to do like no meditation then that that invigilator came and said that like no sorry pa sorry like i'm what is sorry like no so no one has come to kind of uh right here right okay only i came no as a as a name like again i only i came right so why you want to disturb me just give me on one hour right after the second after the first set is over after the first paper is over i'll kind of hand over you to you like no my id if you're not happy can give a complaint please don't disturb me then she get she got me some water and all like i said then i said okay it's fine ma'am so i've already written that time it was 2016 or 17 i remember that was napro keel park only here then i said like uh see ma'am say i already given examination i've already failed also i know that like but if you do this to your fresher know or what will happen to him so he'll get panic acid please you understand and sometimes like no some the initiator like he'll be very strict like no he'll never kind of give up before the bell ringing and he'll kind of immediately before that like no all those strict officers will be there right so so they'll kind of collected some people will be very liberal it all will happen all those mature things will happen but so always be prepared for the worst and definitely when you are kind of forced in anywhere in the north chennai and all definitely they're going with sound from church mosque and temples definitely people will be playing in the nearby ground there'll be death also marriage also any function will happen all sort of sounds will happen to be prepared and why i say you have to take the parents because like you can give your key you can give your mobile if you take it and don't think that you can take ola uber or any other things on that day that'll be waste of time you won't be getting it so better hire a taxi for the whole day and in between that gap what you should do like no have a light food very light food and it is good it's good very little all right and don't discuss as such like no please please don't discuss it will kind of most of the people fail in the exam not because of the tough questions he said too because of you keep discussing your mind is mentally disturbed so that is one request i'm keep on saying that i know some of my students like last year like our students here like who got 120 but they got a fail in paper two so please take paper two also seriously all right and any other thing paper shading and all like no you do that don't take this ink whiteners all right don't take erases and all if one thing goes wrong let it be don't get panic okay five questions one question wrong that's all don't try to erase it don't try to use the whiteners and all it will spoil the paper also it will spoil everything will spoil some some people give give that ideas like a blade like one blade like they'll try to remove that that's all nonsense that is what the excitement i said no so this will happen this is where it happens so more than one minute you skip this question don't come for the second one also mostly mostly it is wrong if you're next to a easy question suddenly you'll be having a easy question you take it correct but shading mostly it will go wrong so this is where this space is where you have to be very careful all right other sort of common composure is very important throughout the examination maintain this calmness if possible do a meditation like no before that one weekend last week no sir came to us was like no director of the academy like police academy director so she also said that that is very to have do meditation do that that'll be good and once after the exam gets over also don't look out for the key two days we enjoy happy be happy because you have put your one and a half years effort two and a half years effort call it be happy never look into the you key because three days are the keys and all like no the exactly proper cake you take at least two to three days take break for three to four days because you have put your effort right be happy nothing is in your hands right now then after three days when the UPC key comes you can come to the academy can discuss it and if you are say some 10 to 15 percent is less than the anticipated cutoff alone you can kind of start if you're more than that it is very well but even if you're less than 10 percent of the cutoff say for instance 90 lender you've got only 18 or like still you can go for it okay I know a lot of people regret that like no sir I haven't prepared started like no suddenly I result was unexpected I cleared I don't know what to do now I also can't do anything because you already wasted you already wasted 20 days that you should not do because UPC key also I said no sometimes it is a variation one one key variation it makes a huge difference as such and that too very ambiguous questions are asking so there is a change also all right so go with confidence so if you have if you are kind of an atheist okay you believe in your parents point if you are non atheist like if you believe in God like no so have faith in your parents have faith in your God have faith in us also all right so you have studied you put the effort you see we have thought for like no so many people like at least you came I don't know for what reasons like some people are online in hundreds for all those people who have faith in me for faith with the parents and the God whatever it is have faith in UPC also if you study UPC will definitely take you never blame UPC for your failures as it's fine all right whatever it is so we'll meet on next mock test also I'll come and then after that we'll kind of meet as it's fine all right so thank you everyone and lastly one more thing this other CAPF actually I've taken this but I don't have time today I won't be able to have it so if possible and the CAPF questions are there in online it is there in these publications or like no other hurrying publications you can get it you solve that also if you have time up once you do this one that will be also good not a UPC like UPC CAPF NDA CDS after the steno examinations like because we just go through that all right so that's it people this is what I want to convey like no because you should not be shattered by seeing yesterday's question paper and yesterday's quality was very tough as I that is the reason all right thank you everyone we'll see and what are the doubts like no I'll clear right now like people online like no uh recording stop and I don't clear


Here is another test question. This test question is more complex. It deals with string processing, although we have not discussed string processing specifically and it was intended to be a session. I would like to repeat by the way that this is not a course on programming. I expect all of you to know programming already. We are discussing how to teach programming. Today we are discussing how to evaluate programs with many others. But this is an interesting complex problem. I had set it in a, when I taught this course in 2011. So here the question is, a text sentence is given as input. The sentence contains one or more comma. The program is to be written that the test problem. Write a program which combines any two words which are on either side of a comma and outputs these two as a single word. If there are any blank spaces present in the sentence, these are ignored. Please note that this is actually the answer to the test question. The original test question appears in a proper question form. Let me illustrate what I am trying to say or what the program is required to do. If you read the original test question, it gives you actually an example of this guide. Some arbitrary sentence. What the question demands is, examine how many commas are there. Here is one comma here and here is another comma here. Now look at the word just before the comma and just after the comma. Combine these two and produce a single word. Came took. Not that it makes any sense, but it examines whether the student is capable of looking at all the characters in a sentence, find out where the comma is, form words of words which are proper words separated by blanks on either side of the comma and then concatenate them to get this. So output will be one word came took, another word came wrote. If there was another comma here and there was something else, I would include that word also. Suppose I have a comma, but nothing after that, then I am expected to combine later with nothing and produce an output later. There are multiple possibilities, but effectively it means the following. It means analyze this sentence. Look at this sentence. Go through each and every character. Identify where the comma is and separate out first the phrases of the sentence around this comma. By the way, this process is called tokenizing or token extraction. In fact, in C there is a special string function called S-T-R-T-O-K or string tokenizer. It has series of parameters, such as a string tokenizer function is able to isolate phrases which are separated by commas and some white spaces, whereas it need not be comma. It could be any delimiter which has to be prescribed as one of the parameters. We are assuming that the students are not familiar with the S-T-R-T-O-K function and they will solve this problem by doing the actual Godagiri of writing a program to read a string, analyze sentences and so on, analyze each character, each alphabet there and then separate out the words. I will not spend too much time in discussing this program, but I will just go over the program that I have written. I would expect you to look at this program and run it in the afternoon session. I will give you another interesting exercise immediately related to this particular program only, but we will talk about it in a minute. So here, these are of course the standard things. The program actually defines a sentence, defines some strings, defines word, defines string, the previous word and previous word that is start of previous word, end of previous word, start of next word, end of next word. Please note that I need to identify the words on either side of a comma and each word will begin at some position and end at some position and I need to know these positions so that I can combine or concatenate those characters and produce a single word. Obviously, this is not a very straightforward or simple problem. I start with a cursor and I say the current position is zero. I will set these positions there. I have multiple positions here. As I said, I will not spend time in analyzing this answer. I will only say the answer works correctly. However, it is a task that you should do individually and collectively. Now, by the way, you have formed teams. So, I would expect teams to work together in the lab system. So, team should work together, meaning someone should examine and explore one set of programs, another colleague should explore another set of programs, do that for 15-20 minutes and then discuss among yourselves what each one has found out, demonstrating the results of execution, etcetera, etcetera and coming up perhaps with some interesting alternatives or modifications. Suffice it to say that this being a fairly involved solution, you require to write a lot of code. You first search for a comma. So, in that sentence, from the current position which you keep incrementing, you examine if it is not blank, you continue. That means, you just skip character positions till you come across a comma. When you come across a comma, you identify that position and store that position here. Please note the trick. C pos is equal to curve pos minus 1. Why? Because while you are evaluating this, curve pos was being automatically updated after every examination. So, when you actually found a comma here, at that point, you will quit this if statement only by incrementing curve pos to the next value. So, the curve pos as you come out is not actually pointing to the comma, it is pointing to the next position. That is why you subtract one from it and assign it to c pos, which sort of represents position of a comma. This is one squiggle I am explaining. You will have to do something very similar at multiple points while writing this program. So, here is the segment which will get the word before the comma and there is a situation that the sentence itself starts with a comma.  No sentence starts with a comma, but somebody deliberately wrote such a sentence to confuse your program. This program takes care that if there is no word before this comma, then I set a flag saying previous word is 0. I will use this flag while concatenating the two words which I would have figured out from the given string. If the word is found, I will look for its start point now. So, I will do exactly the similar processing, keep moving backwards. The first blank I notice is actually indicator that I have gone beyond that word. So, I will go back one position and I say this is the starting point of that word. This was the end point I have noticed. So, followed by this, there is a comma. I will now have to do the same thing for the next word. So, here is a quote to do that. Get the word after comma. Again, somebody might try to fool me by giving an input where the sentence itself ends in comma. So, I determine whether there is any word after comma or not. If there is, I will proceed further and find the end of that word where I am now examining in this direction. Now that I have got these words, I have located the first blank character after the next word. So, I go just beyond the end of sentence. I come back and examine it. Having done this, I will say I will compose a single word from the two words found. How long would it take to write this program? To actually write this program, it may not take more than 15 minutes. How long will it take to figure out the correct logic including the special condition that there may not be any word after the last comma and there may not be any word before the first comma. These extreme cases are often forgotten by the students and we therefore reward less marks to them when they miss out on such condition. Such a test question examines both the ability of the student to think through a complex maze of, I would say, index computation and correctly remembering in the mind what is going to be the pattern of the sentence, how a comma here and comma there is going to look like, how there may be spaces before and after the comma and so on. Incidentally, such spaces in a text sentence amount what is known as white spaces. That means whether there is one space or five spaces, semantically or meaningfully they are just a space, they are called white spaces. In fact, people who write compilers often ensure that the compiler when it reads your program for compilation, it actually simply removes the white space. Such programs, by the way, are handled much better if you have a powerful object oriented paradigm to use which permits handling of lists. A list could be a phrase, a sentence and the list could be handled. It is almost like handling vectors or handling an array of arrays except that you do not have to do complex program. What I have shown here and which as I said might be of interest to you and notice an interesting thing, the entire sentence is full of characters and there is a backslash 0 only at the end of that sentence. But because I have formed a word, a word is properly formed only if it terminates with a backslash 0, I have to artificially give it. This was not the original word, I have combined two words to form a word myself artificially. So, I put a backslash 0 here to terminate the string properly and then I have put that. So, this answer is understood, slightly contrived, slightly complex, but given enough time I can write. Instead of C plus plus, I have got a program written in a programming language called Python. So, here is the Python solution. The Python solution does not read any string because it is just a sample that we were writing, we got this written. He came comma, he sat on a chair comma, he drank water and comma, read newspaper. This is the sentence. What are we supposed to do with this sentence? We have to isolate phrases which are separated by comma, take the word on either side and concatenate. So, I should get came, I should get chair, I should get and read as these strings which are concatenated to give me this adjacent word. The way this program is written is completely different unlike in C or what I have done even in C plus plus, a character string is actually an array of character and I have to examine each and every element which means I have to examine each and every character of a string in order to do, in order to reach some conclusion. However, if I can treat such phrases as a list, set of words as a list, then I can use the list processing concept. So, here is the way he starts it. First he creates an output string which is set to null string. Then he gets a set of list created by saying string dot split on comma. This split is an extremely powerful member function equivalent and it can split this entire sentence into multiple elements or multiple lists. So, this particular split will split this string into one, two, three and four lists. Each list contains several words. Each list is identified by an index 0, 1, 2, 3 just like any C array index. Now this split strings or split lists go to LC later. In Python, when you say for I in LC, it automatically determines what is the number of lists that LC has. In this case 1, 2, 3, 4 and therefore the value that will be picked up here for I in LC will be 4. This represents that I is an index which is valid in LC which is therefore 0, 1, 2, 3, 4. And when I say I dot split, it means I want to apply the Python split function on the ith list of what has been collected here. Once I do that, I append that to the output and print the output. We will see what the output is. So, that means in this iteration for I in LC which executes these statements, incidentally iteration in Python the scope is determined only by the position. So, if I have invented this, these three things form a block to be executed for this false statement. It is a very funny language. So, extremely simple language to use. The number of lines of code that you write for achieving the same function is very less and therefore it has become a darling of program. My objective in showing you this particular example was twofold. One, to say that there are modern programming parallel lines such as object oriented programming or list programming which can do a more complex task which took more effort to write a program in conventional programming languages such as C, Pascal, what have you, will take much less time to write with these modern programming tools. In fact, while we might be teaching C C plus plus to our students in the first semester, it is very desirable that occasionally we give them examples of code like this from some other language. That is how the first year students should get introduced. They should become good programmers using the language which is used as a medium of instruction, but because they should become good programmers, they should be exposed to multitude of such tools and components like this. Here is the last part where the programmer starts with an empty O list. This means an empty O list and then for I in the range length output minus 1, I will explain what length output minus 1 is. He simply appends the first word and the second word together to this growing list and just print the output list. Here is what you would get as an output. The input string is this. So, because I am printing during the successive iteration set up by Python, first I will get one element of the list. He came. Second you will get he came, he sat on a chair. The third I will get he came, he sat on a chair, he drank water and finally read newspaper. This is not written by hand. This is produced by a Python compile. So, these 5, 1, 2, 3 and 4 lists would be created automatically. The second part will produce this code is complex. So, I will not read it anyway. Do not pretend that we know Python, but I am mentioning this for those who are interested in extending their horizons if Python is not at all difficult to understand. So, what here he is actually doing the concatenation of the word previous to comma and word after comma and it is this which when correctly implemented results in came he chair he and read. In fact, the problem is fixed here, but since the he is trying to use this computer program to produce these 3 as a part of a list. So, he puts them into a list and these 3 are readable. Before going to the tea break, I would like to tell you that the code blocks environment that you have is also capable of executing Python code. In fact, there is a utility called code pad which is actually available on internet. It is online.  In fact, this is how my student is actually my staff member and also an M.Tech student. A student from VRC, Nagpur, I remember and now VNIT of course because VNIT is one of our remote centers. So, this Pushpukh Borange, I asked him to write a short program to illustrate object oriented features of C plus plus instead he wrote in Python and later I discovered that the C plus plus library, the object library, rich as it is does not have a built in function equivalent of split. You have to do some Godagiri to get the phrases split differently. In fact, on one of the forums, there is actually an open source implementation available of a class and the member function split to give precisely the Python like facility for doing this. I notice a hand raise at Vivekanan College of Engineering. Before starting, I would like to quickly go over and find out whether someone has a comment to make. I am Malathi from Vivekanan College of Engineering for Manamakal. So, in the morning session you described about evaluation of student project and students questions. So, in that, can I use the negative marking system for evaluating our questions? Yes, very good question. Unfortunately, the auto graders are not yet intelligent enough to award negative marks, but in manual evaluation, we often use negative marking and in fact in the marking scheme that we stipulate to our teaching associates often include negative marks for some specific mistakes that people may make. You are very right. Negative marks can be included. Thanks for that question. Silliguri Institute of Technology, over to you. Sir, I have a question that last day you have given some assignments that we have to execute the sample program and we need to take the input from the file, but we did not even have to do that one. We just said that we went to that program project option, said program arguments, but after that that program did not execute. In that set. And we did that using the file, using the argc argument vector, argument counter, using that one we can do, but. No, in the set, in the set options, there is a box below that. So, in that set and inside that box, you have to type less than file name and you have to ensure that that file is in the same directory. It works. It works in most cases. I just try it out, discuss it with couple of colleagues and try it out. Otherwise, what I will do is, I will get some screen shots captured later and put that on the model so that you can try it at your place, but it works. It works all right. You can do both input and output redirection and output redirection. Okay, sir. And when need to change anything in the program code for that? No, no, no. Program is exactly same. Instead of your see-in statements taking input from the keyboard, they will collect input from that file. It is exactly the standard input or output redirection that you see on the command line. Please try it again. It will definitely work. Thank you. Xavier College. My question is, morning we are discussing about automatic evaluation system. In this, the students will be writing the missing codes, whether it is possible to analyze the efficiency of the program there? Very good question. In fact, a past student of the institute, one Mr. Vinay Kabra, who passed several years ago from IIT, a computer science student, has actually set up a company in Pune, which has created a platform which evaluates not just the correctness of a program, but also how well the program is written. The objective of that system is of course very peculiar. You see, when companies like TCS and Infosys and others try to engage employees, then suppose our students apply to them and as I said, 100 students or 1000 students apply and may be 100 people are able to write correct program. Now, Infosys or TCS does not have time to interview 100 people. What they want to know is that out of these 100 correct programs, which are better program and how do they define better? They should either be more efficient or they should encompass all possible cases of different input values and handle them properly so that for wrong input, proper error messages are given and so on. So, what this company's platform does is, it first gives the specification to the participants saying, you write a program which will do this, this, this. Then they give one or two test cases so that the participants can test their program before submitting. After they submit that program, the people behind have written something like 30 or 40 test cases and these additional test cases evaluate whether the program is taking care of all boundary conditions, whether it is behaving properly, even if erroneous input is given. They also have test cases which for example, will test, let us say some algorithm that is implemented first by let us say 100 input values, then by 1000 input values, then by 10000 input values thereby evaluating the efficiency of the program and what they do is they give a gradation report saying that all these 100 programs work correctly but out of these 100, these 5 are excellent, these 30 are good and the rest are ordinary and then the company like Infosys and TCS will invite only those 5 jokers for interview, others will be rejected. So, it is indeed possible to build such a system. In fact, there are couple of our M.Tech students who are trying to build such a system internally, it is possible to build that. Very good question and in fact, such systems will actually be essential and they should be available at each and every college so that students can themselves put their programs to such system and get to know how good they are programming. Thank you very much for this question. Let us now go over to the next example here. I will go through this example very quickly because the problem actually is very simple but in framing this question for test paper I have tried to give a realistic touch or a real life touch to this basic computational problem. The problem I have stated is balancing load in two trucks. So, there are two trucks each of which contain packages. Packages have different weights and the two trucks have different number of packages also. We assume that all weights are integer. So, 23 kgs, 17 kgs, 94 kgs, whatever, whatever, whatever. Now, obviously in most cases these two trucks will have a different load. This may have so many total kgs, the other truck might have less or more number of kgs. And the problem we pose is we wish to balance the load in both the trucks. More importantly, we want to balance the load in both the trucks by finding out whether it is possible to swap exactly one pair of packages between these two trucks to achieve this value. That means I should be able to locate one package in one truck. I should be able to locate some corresponding package in another truck. By corresponding I do not mean of the same weight because that will not change anything. But the weights are such that if I swap these two packages, then the trucks will contain exactly the equal load. So, the question is to write a program to aid determine whether such exchangeable packages exist at all or not. It might not at all be possible to do so. Second, if it is possible, identify the weights of the packages which need to be exchanged. Now, this is the question given. So, notice that first of all the student will have to translate this question into some kind of a programming or algorithmic structure. What data structure should the student use? How should the student represent the weights in a truck? How should he frame the requirement that exactly one pair of packages have to be exchanged in order to balance the truck load? How exactly the so called balancing of the truck load is to be represented in programming term? Many people believe that these are not programming questions. I differ and many of my colleagues differ. A very, very important part of the knowledge of programming is the ability to take a real life situation and map that situation in terms of programming concepts. When we solve real life problems, people will not specify in algorithmic terms. Find the sum of n terms such that each term is greater than delta. This is not how a practical problem is solved. So, one of the important objectives of teaching programming is to train our students in the ability to take a real life welding of a problem and translate it into programming terms and write a correct program for it. So, this was one attempt. Again, this is a question from one of my past offerings. This is how we should teach students to proceed with this. Initial thoughts on the program design. First, as I said, how do we represent the problem data? Now, since we require comparison of weights of packages from each truck with the packages weights of packages in the other truck, the best way would be to read the respective load values in two arrays. So, I have one array representing package loads, package weights in one truck, another array representing package weights in other truck. Now, we have to make an assumption that maximum number of packages can be so many because the moment we say array, array has to be defined with a physical upper limit. Since we are talking about trucks and packages, probably 100 is a good number, but this choice is as good as any. We will use integer arrays A and B because we have been given that the weights are integer and each has m and n elements respective. So, so far the program design has taken care of representing the data. Now, the representation of the problem in terms of algorithm. So, here we are saying that let us say that truck 1 has the total sum of the load as someone and truck 2 has the total sum of the load as sum 2. What we are looking for is one package with some weight x, a corresponding package with some weight y in the other truck. If y comes here and x goes there, then the total sum should match. Now, if x goes there and y comes here, the total weight on the first truck will be someone minus x plus y and the total weight in the second truck will be sum 2 minus y plus x because y goes away x comes in. It is actually simple once you write it, but I have seen many students goofing up in coming to this simple conclusion. This is absolutely essential in order to translate our real life problem in terms of a program, but once you do that the rest of the program is fairly straight forward. Again I have tried to give more logic for the program. For example, what should our program find? That there may exist pairs of elements of the type x comma y such that x is an element of a and y is an element of b and if these are swapped across the arrays, then the resultant arrays have the property that sum of elements of the new array a is equal to sum of elements of the new array b. Notice that this is a very precise and rigorous definition of what originally exists and what will exist after swapping of the packages. Now we look at the algorithm. So one possible algorithm is to examine every element in one array a and for each of that element which represents some weight let us say x, find if there is any permissible weight y from the other truck. That means you go through one array take one element. Now go through the second array all the elements and find out if there is a corresponding element y. So iterate on array b to find whether b has an element whose value is y. If there is no y for this x I ditch this element go to the next element. This way when I complete the entire iteration over array a and for each element I have examined all the elements. I still do not find a math I say sorry structure load cannot be balanced. But if I find one well I have found the solution. Of course there might be more than one correct solution but the problem requires you to find only one solution. Having reached this this is this is the part by the way on which students should be trained to spend a significant amount of time. Out of 30 minutes let us say allocated to solve this problem we should train our students to spend as much as 5 to 6 minutes to work only on this logic. Many students unfortunately simply rush into writing programs. Here is the program which is actually straight forward. I will not go through the details you can read it for yourself. As I said again this has been loaded on the model. So this is of course a description. Once again it is useful to emphasize to students that although during an exam setting with a fixed time they may not be able to spend so much time in writing comments. But it is a good practice to write in-line documentation for every program including the problem description major steps etc etc. So I read these arrays. I just define the necessary variables like sum 1 sum 2 x y and so on. Observe that first I will have to read the input of course. So I collect the number of packages in each truck and read the weights. This is just the entire input section. After that I find the sum of elements of each array because that is what I have to balance. So sum 1 is found out by one iteration, sum 2 is found out by another iteration. I just output that value. Now I do a curious thing here. I find the difference as absolute value of sum 2 minus sum 1. If this difference modulo 2 is not equal to 0 I conclude difference of the sums is not even. And I therefore say desired pair of packages does not exist. This is an interesting observation and anybody who makes this observation is actually a better programmer because the student is actually able to figure out that unless the difference is even why because it has to be divided by 2 and the divided value has to result in an integer because all weights are integer. So this is an interesting observation and just as some colleague mentioned that we should not give negative marking. Now it is unfair to provide negative marking if our student does not include this answer but we treat such additional answers worthy of bonus point. So we give plus 1 or plus 2 points on occasion. It is possible in our marking system it should be possible for some student to get 12 out of 10 marks for a question because the question has been written exceedingly well. So this was to illustrate that point. Rest of it is technique. The basic algorithm is stated here that these are the equations. So 2 y equal to this and therefore y is equal to sum 2 minus sum 1 by 2 plus x. This formula incidentally is important to derive because we are going to look at every element of array a which we represent by x and for each x we are going to look for y. So you must have a formula that if there is some x how do we calculate y? Once we calculate y we will look for y in the secondary. So as I said the rest of it is fairly straight forward. I run an iteration i equal to 0 to m minus 1. Find the value of y which is a possible replacement of t1i. y is equal to this. Now search for y in array b. I search like this. If I find something I said t1i to be exchanged with t2j. Please notice that this loop still keeps running and it actually finds all possible pairs although that is not exactly as for. However if nothing is found my found count which will increase every time a pair is found will remain 0 and I say sorry balancing not possible. So notice that the solution is not very complex but the ability to think through a physical real world problem may be slightly artificial because you do not balance the truck by matching exactly one pair of packages. I mean you would balance it by taking away any number of packages from here and exchange them with any number of packages there. Indeed that could be an extended problem and it is a harder mathematical problem to solve. However this is a good test problem with that. So there is a sample load data given. This is in the slides. Slides are also loaded. You can run this program and try any variations thereof in the afternoon lab. Here is another example which is slightly a harder problem. If x1, x2, xn is a sequence of integers possibly negative. Then for each possible sequence xi, xi plus 1 etcetera xj consider its sum called sij. Now write a program that reads in the sequence in order with n given at the beginning and prints out the minimum sum sij over all possible sub sequences. It is a well known mathematical problem. I will not spend time on this but to write a program you can do the Godagiri way by using two iterations or there is a very neat mathematical technique to find out the solution to this. A particular solution which was given by professor Divaan to me. Of course it is a well known mathematical problem and he is a wizard of algorithms in IIT Bombay and therefore he just strictly told me of the cuff that this is the solution. Namely that we calculate si using these rules simply. Si is ai if si minus 1 is greater than equal to 0 or it is ai plus si minus 1 otherwise. Initially a 0 is set to a 0. A is obviously the array of the given elements and s is the array of partial sums that we calculate up to any point i. So as I said I will not dwell on this.