Skip to content

Commit

Permalink
Code uploaded on Github.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-wazoski-1991 committed Aug 23, 2024
1 parent 2c90072 commit 2a34291
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions formatted_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# def format_name(f_name,l_name):
# return f_name+" "+l_name

# first_name = input("Enter your first name:\n").capitalize()
# last_name = input("Enter your last name:\n").capitalize()

# complete_name = format_name(first_name,last_name)
# print(f"Hello {complete_name}")

#Doing the same by another method

def formatted_name(f_name,l_name):
formatted_f_name = f_name.title()
formatted_l_name = l_name.title()
return f"Hello {formatted_f_name} {formatted_l_name}"


print(formatted_name(f_name=input("Your First Name:\n"),l_name=input("Your Last Name:\n")))
#it's not a new concept, you've already been using it (remember the len() function)
#print(len('Angela'))
6 changes: 6 additions & 0 deletions use_of_return_in_function.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def my_function():
return 3*2


output = my_function()
print(output)

0 comments on commit 2a34291

Please sign in to comment.