A major advantage of the waterfall approach in software development life cycle (SDLC) to software development is the: A. high degree of management control.
What is software development life cycle (SDLC)?
Software development life cycle (SDLC) can be defined as a strategic process (methodology) that defines the key steps or stages that are for the creation and implementation of high quality software programs (applications).
The types of models in SDLC:
Generally, there are six (6) types of models in software development life cycle (SDLC) and these are:
Agile ModelV-Shaped ModelIterative ModelSpiral ModelBig Bang ModelWaterfall ModelWhat is a waterfall model?
In SDLC, a waterfall model refers to a process which involves the sequential breakdown of software development into linear stages (steps or phases). Thus, its development stages takes a downward flow like a waterfall and as such, each stage must be completed before starting another and without any overlap in the process.
In conclusion, a major advantage of the waterfall approach in software development life cycle (SDLC) to software development is the high degree of management control because its development stages and there isn't any room for overlap.
Read more on waterfall model here: https://brainly.com/question/18369405
Create a program that uses an array of Shape references to objects of each concrete class in the hierarchy (see program-2). The program should print a text description of the object to which each array element refers. Also, in the loop that processes all the shapes in the array, determine the size of each shape If it‟s a TwoDimensionalShape, display its area. If it‟s a ThreeDimensionalShape, display its area and volum
The program uses an array for shape reference to objects of each concrete class given. The program is in text description in java language.
What is a program array?Array programming in computer science refers to methods that allow operations to be applied to a whole set of values at once. This kind of solution is frequently used in scientific and engineering settings.
Shape.java
public abstract class Shape { private int sides;
public Shape() {
this.sides=0;
}
public Shape(int sides) { super(); this.sides = sides;
}
public int getSides() { return sides;
}
public void setSides (int sides) { this.sides = sides;
}
public abstract double calcArea();
Override
public String toString() {
return "This Shape has [sides=" + sides + "]";
Therefore, the program array is given above.
To learn more about program array, refer to the link:
https://brainly.com/question/13104121
#SPJ2
What does “The Principle of Least Privilege” mean as applied to security?
Answer:
The principle of least privilege (PoLP) refers to an information security concept in which a user is given the minimum levels of access – or permissions – needed to perform his/her job functions. ... Least privilege enforcement ensures the non-human tool has the requisite access needed – and nothing more.
Explanation: let me know if this helps!
Problem: For multi access control, there are two approaches, those based on channel partitioning, and those based on random access. In packet switching, there are two rather similar approaches as well, namely, circuit switching and package switching. Discuss the similarities and differences in these two problem domains and the corresponding approaches g
The similarity between the two systems is the ability to connect many different communication devices and transfer data between a sender and a receiver. The main difference is the need for a connection for both to work.
We can arrive at this answer because:
Circuit and package quotation is very important for the connections of different communication devices.Furthermore, these two systems are used efficiently when a data transfer is required.However, even being used for the same purposes, they have many differences between them.The biggest difference is the need for a connection, as package switching is done without the need for a connection, while circuit switching needs a connection to act.In addition, circuit switching is more widely used because of its ability to transfer data from one point to another via message transfer, while package switching is used when circuit switching is not available as it does the sending data more slowly across one drive.
More information:
https://brainly.com/question/7227504
Write SQL queries to answer the following questions: (15 points) a. Which students have an ID number that is less than 50000
Answer:
SELECT * FROM STUDENTS WHERE ID < 50000
Explanation:
If we assume the table is called STUDENTS, then we want to select everything (represented by *), where (like an if statement) the ID (assuming the name of the column) is less than 50000.
Which of the following is NOT a function of a Web Browser?
O Provide a platform that users can use to access web pages and sites
O Access a Web server and request a page on the Internet so the right information shows up
O Crawl through the World Wide Web searching for words and terms to index in Web Databases
O Interpret Web page's HTML tags and display the Web page's information in a way that is intended/easily readable for you
A web browser is used to gain access to the contents of a website, displaying the information in a readable and easily understandable format. Hence, an option which isn't a function of a web browser is Crawl through the World Wide Web searching for words and terms to index in Web Databases
A web browsers allows users to access web pages and sites, by accessing web servers and requesting access to display the contents. Web pages are written in Hypertext Markup Language (HTML). Browsers interpret these document format and tags so that it is displayed in an understandable format.Learn more : https://brainly.com/question/17130932
What's computer hardware
Identify the false statement. a. When you use inheritance to create a class, you save time because you can copy and paste fields, properties, and methods that have already been created for the original class. b. When you use inheritance to create a class, you reduce the chance of errors because the original class's properties and methods have already been used and tested. c. When you use inheritance to create a class, you make it easier for anyone who has used the original class to understand the new class because such users can concentrate on the new features.
Uploading this answer for points please do not accept this answer thank you.
Differentiate between patent and copyright.
Answer: Patent - securing an invention
Copyrights - securing original ideas
Both are governed by different rules and regulations and both are for different purposes.
Would appreciate brainly <3
Can someone pass me Unit 2 Basic Animations from CMU CS ACADEMY, I'll pay you if you pass it to me.
Answer:
i could but it depends on how much pay
Explanation:
Answer:
ii have the awmsers
Explanation:
unit two
# speedX should be -5 and speedY should be -25.
### Fix Your Code Here ###
Circle(350, 350, 50, fill='ghostWhite', border='black')
ballStitches = Oval(350, 350, 50, 95, fill='ghostWhite', borderWidth=3, dashes=True,
border=gradient('red', 'red', 'red', 'ghostWhite'))
gloveThumb = Oval(260, 375, 75, 120, fill='brown', border='black', rotateAngle=25)
glove = Oval(200, 375, 130, 150, fill='brown', border='black')
# This moves the ball to be 250 away from the mouse in the x-position.
ball.centerX = glove.centerX + 250
ball.centerY = mouseY
# Move the ball stitches to where the ball is.
### Place Your Code Here ###
ball=Circle(350, 350, 50, fill='ghostWhite', border='black')
Explain the role that the number of data exchanges plays in the analysis of selection sort and bubble sort. What role, if any, does the size of the data objects play
Answer:
The greater the number of exchanges are there greater is the complexity of the algorithm. Thus it is a measure to check for the complexity of the program.
Which statement best explains how the main idea relates to taking notes?
The main idea is always included in effective notes.
The main idea is always easy to identify.
The main idea is rarely used as a title for notes.
The main idea is rarely identified by listening or reading
Answer:
The main idea is always included in effective notes.
Answer:
a
Explanation:
I did the quiz
Which of the following is a federal initiative that is designed to encourage organizations to address how critical operations will continue under a broad range of negative circumstances?
A continuity of operation planning (COOP) is an initiative that is designed by the federal government, so as to encourage business organizations and its departments to address how essential functions and critical operations will continue under a broad range of negative circumstances (disaster).
Business continuity can be defined as an advanced planning, processes, procedures, preparation, and decisions made by a business organization, so as to ensure the maintenance of essential functions and critical operations during and after the occurrence of a disaster. Thus, a disaster recovery plan (DRP), business impact analysis (BIA) and continuity of operation planning (COOP) are an integral and important part of business continuity.
A continuity of operation planning (COOP) is an initiative that is designed by the federal government of the United States of America, so as to encourage business organizations and its departments to address how essential functions and critical operations will continue under a broad range of negative circumstances (disaster).
In continuity of operation planning (COOP), an all round hazard approach is adopted rather than just focusing on specific hazardous events, in order to ensure essential functions and critical operations of a business organizations will continue under a broad range of negative circumstances (disaster).
Read more: https://brainly.com/question/17586013
Which tab must be enabled to access the VBA Editor?
O Developer
O Insert
O Review
O View
The answer to your question is Developer.
Sebutkan contoh komputer analog, komputer digital, dan komputer hybrid
Answer: the examples of analog computer is voltmeter
Example of digital computer is tablet,mobile etc
Example of hybrid computer is digital meters used nowadays in cars etc
You arrive at your first client meeting with Jaba's Smoothie Hut. Jaba's owner, Kim, has asked you to install a Wi-Fi network for his customers. Kim has told you that the store needs the following:
Dedicated internet service with enough bandwidth to meet customer demand and run the store.
Be cost effective (Kim does not want the most expensive or the cheapest).
Customers will use Wi-Fi and the business will have 5 wired connections
Select the correct package for the Jaba's Smoothie Hut:
a. 20 Mbps service with 1 modem/Router, a 16 port switch, and 1 wireless access point
b. 100 Mbps service with 1 Modem/Router, a 24 port switch, 3 wireless access points (1 for office, 1 for retail, and 1 for outside)
The correct package which can be used to set up the Jaba's Smoothie Hut so that there would be dedicated internet service with enough bandwidth to meet customer demand and run the store is:
b. 100 Mbps service with 1 Modem/Router, a 24 port switch, 3 wireless access points (1 for office, 1 for retail, and 1 for outside)According to the given question, we are asked to show the correct package which can be used to set up the Jaba's Smoothie Hut so that there would be dedicated internet service with enough bandwidth to meet customer demand and run the store
As a result of this, we can see that when using wireless networks (WiFi), there is a necessity to make use of a fast 100 Mbps service so that the connection would have sufficient bandwidth to meet the needs of the store and customers.
Therefore, the correct answer is Option B
Read more here:
https://brainly.com/question/18450917
You modified the GreenvilleRevenue program to include a number of methods. Now modify every data entry statement to use a TryParse() method to ensure that each piece of data is the correct type. Any invalid user entries should generate an appropriate message, and the user should be required to reenter the data.
using System;
using static System.Console;
class GreenvilleRevenue
{
static void Main(string[] args)
{
const int fee = 25;
int lastYearsContestants;
int thisYearsContestants;
const int LOW = 0;
const int HIGH = 30;
int other = 0;
int dancer = 0;
int musician = 0;
int singer = 0;
WriteLine("**********************************");
WriteLine("* The stars shine in Greenville. *");
WriteLine("**********************************");
WriteLine("");
lastYearsContestants = getContestantsNum(message, LOW, HIGH);
string[] contestant = new string[thisYearsContestants];
string[] talent = new string[thisYearsContestants];
getContestantsInfo(contestant, talent);
for (int x = 0; x < talent.Length; ++x)
{
if (talent[x] == "O")
{
++other;
}
else if (talent[x] == "S")
{
++singer;
}
else if (talent[x] == "D")
{
++dancer;
}
else if (talent[x] == "M")
{
++musician;
}
}
Clear();
WriteLine("Currently signed up, there are..");
WriteLine("{0} dancers", dancer);
WriteLine("{0} singers", singer);
WriteLine("{0} musicians", musician);
WriteLine("{0} everything else!", other);
contestantByTalent(contestant, talent);
Clear();
contestantInfo(thisYearsContestants, lastYearsContestants, fee);
}
static int getContestantsNum(string message, int LOW, int HIGH)
{
WriteLine("Please enter the number of contestants for last year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
WriteLine("Please enter the number of contestants for this year.>>");
string input = ReadLine();
int contestantsNum = Convert.ToInt32(input);
while (contestantsNum < LOW || contestantsNum > HIGH)
{
WriteLine("Valid numbers are 0 through 30, Please try again.>>");
contestantsNum = Convert.ToInt32(ReadLine());
}
return contestantsNum;
}
static string getTalent(int contestantsNum)
{
bool correct = false;
string talentType = "";
while (!correct)
{
WriteLine("What is contestant " + contestantsNum + "'s skill? Please enter 'S' for Singer, 'D' for Dancer, 'M' for " +
"Musician, 'O' for Other.>>");
talentType = ReadLine().ToUpper();
if (talentType == "S" || talentType == "D" || talentType == "M" || talentType == "O")
{
correct = true;
}
else
{
WriteLine("Please enter a valid response.>>");
}
}
return talentType;
}
static void contestantByTalent(string[] contestant, string[] talent)
{
WriteLine ("To see a list of all contestants with a specific talent, Please enter a talent code.talent codes are(S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
string entry = ReadLine().ToUpper();
while (entry != "E")
{
if (entry != "S" && entry != "D" && entry != "M" && entry != "O")
{
WriteLine("That wasn't a valid talent code. Valid talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
if (entry == "E")
break;
}
for (int x = 0; x < talent.Length; ++x)
{
if (entry == talent[x])
WriteLine("Contestant " + contestant[x] + " talent " + talent[x]);
}
WriteLine("To see a list of all contestants with a specific talent, Please enter a talent code. talent codes are (S)inger, (D)ancer, (M)usician, (O)ther; altenatively, you may type (E) to exit.>>");
entry = ReadLine().ToUpper();
}
}
static void getContestantsInfo(string[] contestant, string[] talent)
{
for (int x = 0; x < contestant.Length; ++x)
{
WriteLine("What is the name for Contestant " + (x + 1) + "?");
contestant[x] = ReadLine();
talent[x] = getTalent(x + 1);
}
}
static void contestantInfo (int thisYearsContestants, int lastYearsContestants, int fee)
{
if (thisYearsContestants > lastYearsContestants * 2)
{
WriteLine("The competition is more than twice as big this year!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants > lastYearsContestants && thisYearsContestants <= (lastYearsContestants * 2))
{
WriteLine("The competition is bigger than ever!");
WriteLine("The expected revenue for this year's competition is {0:C}", (thisYearsContestants * fee));
}
else
if (thisYearsContestants < lastYearsContestants)
{
WriteLine("A tighter race this year! Come out and cast your vote!");
WriteLine("The expected revenue for this year's competition is {0:C}.", (thisYearsContestants * fee));
}
}
}
Create a program that asks the user for the number of male and female students registered in a class/section. The program should display the total number of students and the percentage of male and female in the class.
Sample output
Enter the number of male: 36
Enter the number of female: 17
Number of students = 53
Male = 67.92%
Female = 32.08%
Write javascript code for the form that appears in the image below. you are expected to add validation to the name field, email field, and radio button selection. The HTML code is given below, Insert the javascript validation code in the area of the HTML code shown below and save the file. Paste one screenshot of the validation you have written.
Couldn't find much on this, and don't rly know what to do.
50 free po.intssssssss!
Answer:ty
Explanation:
What is the difference between (IF instructions & WHILE instructions )
0
를 들
T
!
Answer:
While statements determine whether a statement is true or false. If what’s stated is true, then the program runs the statement and returns to the first step. If what’s stated is false, the program exits the while and goes to the next statement. An added step to while statements is turning them into continuous loops. If you don’t change the value so that the condition is never false, the while statement becomes an infinite loop.
If statements are the simplest form of conditional statements, statements that allow us to check conditions and change behavior/output accordingly. The part of the statement following the if is called the condition. If the condition is true, the instruction in the statement runs. If the condition is not true, it does not. The if statements are also compound statements. They have a header (if x) followed by an indented statement (an instruction to be followed is x is true). There is no limit to the number of these indented statements, but there must be at least one.
Your company is building a new architecture to support its data-centric business focus. You are responsible for setting up the network. Your company's mobile and web-facing applications will be deployed on-premises, and all data analysis will be conducted in GCP. The plan is to process and load 7 years of archived .csv files totaling 900 TB of data and then continue loading 10 TB of data daily. You currently have an existing 100-MB internet connection. What actions will meet your company's needs
The actions will meet your company's needs is to Lease a Transfer Appliance, upload archived files to it, and send it to oogle to transfer archived data to Cloud Storage.
Data centric is simply known to be an architecture where data is said to be of primary and permanent asset, and applications is temporary.
Businesses is all about functionality, and as such, firms often buys or build application systems.Each application system is known to have its own unique data model, and its code is often linked with the data model used.
Conclusively, Transferring large datasets needs manpower that is the right team, planning early, and testing your transfer plan before its use.
Learn more data-centric business from
https://brainly.com/question/21810261
Write a program that lists all ways people can line up for a photo (all permutations of a list of strings). The program will read a list of one word names (until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line.
The solution is the recursive Python 3 function below:
########################################################
def allNamePermutations(listOfNames):
# return all possible permutations of listOfNames
if len(listOfNames) == 0 or len(listOfNames) == 1:
# base case
return [listOfNames]
else:
# recursive step
result_list = [ ]
remaining_items = [ ]
for firstName in listOfNames:
remaining_items = [otherName for otherName in listOfNames if
(otherName != firstName)]
result_list += concat(firstName,
allNamePermutations(remaining_items))
return result_list
#######################################################
How does the above function work?
As with all recursive functions, this one also has a base case, and a recursive step. The base case tests to make sure the function terminates. Then, it directly returns a fixed value. It does not make a recursive call.
In the case of this function, the base case checked listOfNames to see if it was empty or only had one name. If any of the conditions were satisfied, a new list containing listOfNames is returned.
The recursive step is where the function allNamePermutations() calls itself recursively. The recursive step handles the case where listOfNames has more than one item. This step first iterates over each name in listOfNames, and then does the following;
Gets a name in listOfNameGets a list of other names in listOfNamesCalls allNamePermutations() on the list of other names to get a list of permutation of the other names.(By first getting the list of other names before passing it into
allNamePermutations(), we make sure the recursive step eventually
terminates. This is because we are passing a smaller list each time
we make the recursive call.)
Inserts the current name in front of each permutationAdds the results to the result list to be returned laterAfter the iteration, it returns the result list which will now contain all permutations of the names in the list.
The concat function is defined below
##################################################
def concat(name, listOfNameLists):
# insert name in front of every list in listOfNameLists
result_list = [ ]
for nameList in listOfNameLists:
nameList.insert(0, name)
result_list.append(nameList)
return result_list
#####################################################
If we run the sample test case below
####################################
name_list = ['Adam', 'Barbara', 'Celine']
allNamePermutations(name_list)
####################################
the following output is produced
[['Adam', 'Barbara', 'Celine'],
['Adam', 'Celine', 'Barbara'],
['Barbara', 'Adam', 'Celine'],
['Barbara', 'Celine', 'Adam'],
['Celine', 'Adam', 'Barbara'],
['Celine', 'Barbara', 'Adam']]
For another example of how to use recursion in Python, see the following example in the link below
https://brainly.com/question/17229221
You work in an office that uses Linux and Windows servers. The network uses the IP protocol. You are sitting at a Windows workstation. An application you are using is unable to connect to a Windows server named FileSrv2. Which of the following commands would work BEST to test network connectivity between your workstation and the server?
a. arp
b. dig
c. tracert
d. nslookup
e. ping
Answer:
ping
Explanation:
its ping. im a computer science nerd :')
11.23. Sort the words in a sentence Define a function called sorted_word_list, which takes a sentence (a string) as a parameter. Complete the function to make and return a list of the words in the sentence in sorted order.
The function to make and return a list of the words in the sentence in sorted order is as follows:
def sorted_word_list(x):
sorted_characters = sorted(x)
return list(sorted_characters)
print(sorted_word_list("string"))
The code is written in python .
We declared a function named sorted_word_list with a parameter x. The parameter accept a string.
sorted_characters is a variable that stores the sorted strings.
Then we return a list of the sorted string using the return statement.
Finally, we call the function using the print statement.
The values that are bolded in the code are python keywords.
read more: https://brainly.com/question/13973680?referrer=searchResults
explain how you activate window explore
Answer:
Win+R -> Type "explorer.exe" -> Press enter
What is a storage device? Give one example of Primary magnetic storage, Primary optical storage and Portable storage.
Answer:
fácil solo ve a tu almacenamiento y aprende
Sarah was recently reviewing all the photos that she has saved on her computer and was shocked to find that she has over 10,000 images. Thankfully, digital photography will allow her to rearrange, organize, and easily search within her photos. What types of tasks are these?
A.
image evolution
B.
image formatting
C.
image editing
D.
image management
Answer:
D
Explanation:
image management
The type of task that allows Sarah to rearrange, organize, and easily search within her photos is known as Image management. Thus, the correct option for this question is D.
What do you mean by image management?Image management may be characterized as a type of feature that allows a user to store, organize, centralize, and distribute digital images, assets, and graphics that are automatically saved in the computer. It also evaluates and enhances your image with respect to the perception of others.
According to the context of this question, image formatting nay deals with the file formatting for a digital image such as JPEG, PNG, GIF, etc. Image editing encompasses the process and strategy of acquiring alteration in the image with respect to a user.
Therefore, image management is the task that allows Sarah to rearrange, organize, and easily search within her photos. Thus, the correct option for this question is D.
To learn more about Image management, refer to the link:
https://brainly.com/question/19263329
#SPJ2
6-Write a BNF description of the precedence and associativity rules defined for the expressions in Problem 9 - chapter 7 of the textbook . Assume the only operands are the names a,b,c,d, and e.
The BNF description, or BNF Grammar, of the precedence and associativity rules are
[tex]<identifier>\text{ }::=a|b|c|d|e[/tex]
[tex]<operand>\text{ }::=\text{ }NUMBER\text{ }|\text{ }<Identifier>[/tex]
[tex]<factor>\text{ }::=\text{ }<operand>|\text{ }-<operand>|\text{ }(<expression>)[/tex]
[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<factor>\text{**} <power>[/tex]
[tex]<term>\text{ }::=\text{ }<power>\text{ }\\|\text{ }<term>*<power>\text{ }\\|\text{ }<term>/<power>\\\\<expression>\text{ }::=\text{ }<term>\text{ }\\|\text{ }<expression>+<term>\text{ }\\|\text{ }<expression>-<term>[/tex]
BNF, or Backus-Naur Form, is a notation for expressing the syntax of languages. It is made up of a set of derivation rules. For each rule, the Left-Hand-Side specifies a nonterminal symbol, while the Right-Hand-side consists of a sequence of either terminal, or nonterminal symbols.
To define precedence in BNF, note that the rules have to be defined so that:
A negation or bracket matches first, as seen in the nonterminal rule for factorA power matches next, as seen in the rule defining a factorA multiplication, or division expression matches next, as seen in the rule defining a termFinally, addition, or subtraction match, as seen in the rule defining an expression.To make sure that the expression is properly grouped, or associativity is taken into account,
Since powers associate to the right (that is, [tex]x \text{**} y\text{**}z=x \text{**} (y\text{**}z)\text{ and not }(x \text{**} y)\text{**}z[/tex]), the rule defining power does this[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<factor>\text{**} <power>[/tex]
and not
[tex]<power>\text{ }:=\text{ }<factor>\text{ }|\text{ }<power>\text{**}<factor>[/tex]
Since multiplication/division are left associative (that is, [tex]x \text{*} y\text{*}z=(x \text{*} y)\text{*}z[/tex]), the rule defining a term takes this into account by specifying its recursion on the right of the operators like so;[tex]<term>\text{ }::=\text{ }<power>\text{ }\\|\text{ }<term>*<power>\text{ }\\|\text{ }<term>/<power>[/tex]
Also, addition and subtraction are left associative (that is, [tex]x \text{+} y\text{+}z=(x \text{+} y)\text{+}z[/tex]), the rule defining an expression takes this into account as seen below[tex]<expression>\text{ }::=\text{ }<term>\text{ }\\|\text{ }<expression>+<term>\text{ }\\|\text{ }<expression>-<term>[/tex]
Learn more about BNF grammars here: https://brainly.com/question/13668912
what don't you like about creating a new document using Microsoft office button
Given a variable that contains mixed collection types, update the provided function to display the first inital and last name of the instructor:
Update the function to accept a list and the name of the instructor you wish to find.
Update the function to reformat the name of the instructor and return it back to the calling program.
If the instructors name is entered as John Smith then the function should return back J. Smith
If the instructors name is entered as Tracy Anne Rios then the function should return back T. Rios
If the instructors name is entered as Jackson then the function should return back Jackson
Add in any exception handling for the following scenarios:
Exceptions related to accessing the list or dictionary should output the message: Instructor not found.
All other exceptions should output the message: An error has occurred.
Test to ensure the program passes the provided test cases found in the TESTS.md file
Hints
You may only use a try/except block, no if statements
Figure out how to use only one return in the method
Tests.md:
Input
Amy Williams
Output
A. Williams
Case 2
Input
Sarah Jane Smith
Output
S. Smith
Case 3
Input
Thomas Tom
Output
Instructor not found.
What i have so far
#!/usr/bin/env python3
# Discussion 10.2: Collection Type Exceptions
# Task 1. Modify Functions for Names
def get_initial_name(initials, name):
list = instructor_name.split(' ') # this function returns a list
try:
initial = list[0][0]
name = list[-1]
f_name = initial + '. ' + name
except:
return 'Instructor not found'
# DO NOT MODIFY BELOW
if __name__ == "__main__":
courses = [
{ "name": "Amy Andrews", "courseName": "Math I", "units": 3 },
{ "name": "Bryan Bravo", "courseName": "English I", "units": 3},
{ "name": "Charles Chavez", "courseName": "Physics I", "units": 3 },
{ "name": "Daniel Diaz", "courseName": "Chemistry I", "units": 3 },
{ "name": "Edgar Allen Elam", "courseName": "Math II", "units": 3 },
{ "name": "Felicia Farr", "courseName": "Music I", "units": 3 },
{ "name": "GarthGarcia", "courseName": "Physical Education I", "units": 3 }
]
# Take Input
instructor_name = input("> ")
# Output the Result
print(get_initial_name(courses, instructor_name))