Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#APA citation style cites author names like this: # # Last, F., Joyner, D., & Burdell, G. # #Note the following: # # - Each

#APA citation style cites author names like this:

#

# Last, F., Joyner, D., & Burdell, G.

#

#Note the following:

#

# - Each individual name is listed as the last name, then a

# comma, then the first initial, then a period.

# - The names are separated by commas, including the last

# two.

# - There is also an ampersand and additional space before

# the final name.

# - There is no space or comma following the last period.

#

#Write a function called names_to_apa. names_to_apa should

#take as input one string, and return a reformatted string

#according to the style given above. You can assume that

#the input string will be of the following format:

#

# First Last, David Joyner, and George Burdell

#

#You may assume the following:

#

# - There will be at least three names, with "and" before

# the last name.

# - Each name will have exactly two words.

# - There will be commas between each pair of names.

# - The word 'and' will precede the last name.

# - The names will only be letters (no punctuation, special

# characters, etc.), and first and last name will both be

# capitalized.

#Write your function below!

#Below are some lines of code that will test your function.

#You can change the value of the variable(s) to test your

#function with different inputs.

#

#If your function works correctly, this will originally

#print: Last, F., Joyner, D., & Burdell, G.

print(names_to_apa("First Last, David Joyner, and George Burdell"))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions