Best Python code snippet using Kiwi_python
get_initails_function.py
Source:get_initails_function.py
...3# Parameters:4# name: the name of a person5# Return value:6# first letter of name passed in as a parameter in uppercase 7def get_initial(name):8 initial = name[0:1].upper()9 return initial10# This program will ask for someone's name and return the initials11first_name = input('Enter your first name: ')12# Call get_initial to retrieve initial of name13first_name_initial = get_initial(first_name)14middle_name = input('Enter your middle name: ')15# Call get_initial to retrieve initial of name16middle_name_initial = get_initial(middle_name)17last_name = input('Enter your last name: ')18# Call get_initial to retrieve initial of name19last_name_initial = get_initial(last_name)20print('Your initials are: ' + first_name_initial \...
getting_clever_with_functions_harder_to_read.py
Source:getting_clever_with_functions_harder_to_read.py
...3# Parameters:4# name: the name of a person5# Return value:6# first letter of name passed in as a parameter in uppercase 7def get_initial(name):8 initial = name[0:1].upper()9 return initial10#Ask for someone's name and return the initials11first_name = input('Enter your first name: ')12middle_name = input('Enter your middle name: ')13last_name = input('Enter your last name: ')14# Call get_initial function to return first letter of a name15print('Your initials are: ' \16 + get_initial(first_name) \17 + get_initial(middle_name) \...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!