Answer:
See explaination
Explanation:
Please check below for the code for first_word.py file which will print first word of an input file stuff.txt. So the open function will open file in read mode. We had maintained a count variable so that we can skip printing first word of first line. Also the command line.strip() checks whether string is empty or not so that we will not get index error while calling split function over line to get first word.
#!/usr/local/bin/python
stuff = open("stuff.txt", "r");
count = 0;
for line in stuff:
count+=1;
if (count>1 and line.strip()):
print(line.split(maxsplit=1)[0])
A crime problem in my community is related to cell phone theft. According to the local newspaper, it is estimated that in my city about 10 cell phones are stolen per week. Still according to the local newspaper, most of these robberies occur in the city center and in the periphery, with women being the biggest victims.
Although the police have shown themselves to be a restraining force on this type of crime, few arrests have been made successfully, mainly for the negligence of the victims in providing a complaints.
The main driving force behind this crime is drug trafficking. Most burglars steal cell phones to sell them and have money to buy drugs. This is totally related to the government's neglect to promote quality education in the city, allowing several children and young people to stay on the street and run the risk of becoming involved in the traffic.
A cause and effect diagram for this situation is:
Irresponsible government ---> poor quality education ---> children and adolescents on the streets ---> involvement in drug trafficking ---> theft of cell phones ----> frightened population ---> lack of complaints ----> criminals on the street.
In order to create a chart, which of the following must be selected?
O Data tools