Use PYTHON3 to create a program that asks the user for their name, and then prints their initials. You must create a function called getInitials() that takes the name string and prints out the initials. It must be case insensitive and the initials must be printed in upper case. The program must contain a main() and a function called getInitials(), implemented as described in the function header comment given below. (You should include this function header comment in your own code.) ###########################################################
# getInitials() counts the instances of a letter in a string
# Input: name; a string containing the name of the user
# Output: None
PLEASE USE MEANINGFUL VARIABLES AND DON'T USE FOR LOOP OR BREAK..
###########################################################
# getInitials() counts the instances of a letter in a string
# Input: name; a string containing the name of the user
# Output: None
def getInitials(name):
words = name.split()
i = 0
while i < len(words):
print(words[i][0].upper(), end='')
i += 1
print()
def main():
name = input("Enter name: ")
print("Initials are: ")
getInitials(name)
if __name__ == '__main__':
main()
Use PYTHON3 to create a program that asks the user for their name, and then prints...
Please use PYTHON3 to Create a program that translates English into Pig Latin. The function will take the first letter of each word in the sentence only if it’s a not a vowel, and place it at the end of the word followed by “ay”. Your program must be case insensitive. You must write the function translate() that takes in a single English word and returns its Pig Latin translation. Remember translate must take only one word as input. #############################################################...
Create a program with functions in C++: Asks the user for 2 numbers Generates & prints 10 random numbers between the 2 numbers Asks the user for 2 numbers Generates and prints 10 random numbers between the square of the two numbers
Write a small program that asks the user how many asterisks it should print out. The user responds with a number, then the program prints that number of asterisks. The number of asterisks to print should be stored in a variable. Finally the program asks the user if it should start over, and repeats as many times as the user wants. The prompt to run the program again should look like the one below, and should wait at the end...
Write a program that asks for 'name from the user and then asks for a number and stores the two in a dictionary [called the_dicr) as key-value pair. The program then asks if the user wants to enter more data [More data ly/n]?) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list Note: Ignore the case where the name is already...
In a file called First SecondNext.java, write a program that: • Asks the user to enter a string that contains at least five letters. It is OK if your program crashes when the user enters a string with length less than 5. • Stores that string in a variable called s. • Creates a variable called "first", and sets it equal to the first letter of s. • Creates a variable called "second", and sets it equal to the second...
Objectives: Use strings and string library functions. Write a program that asks the user to enter a string and output the string in all uppercase letters. The program should then display the number of white space characters in the string. You program should run continuously until the user enters an empty string. The program must use the following two functions: A function called count_spaces that counts the number of white spaces inside a string. int count_space(char str[]); which tell you...
In python create a program that does the following: Asks the user for their first name Asks the user for their last name Asks the user for the year they were born Calculates the age of the user from this number Gives an output message stating: It is nice to meet them (call them by name) And how impressed you are by their age
Java Letter Counter: Write a program that asks the user to enter a string, and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the string. Must use a do while loop and a counter!!!!
Write a C Program that asks the user to input a string and then the user is prompted back whether the input string is a “Palindrome Word” or not. (A Palindrome Word reads the same backward or forward, eg. madam, racecar, etc.) Your program should contain a function that accepts the input string from the main function and returns a value indicating whether the input string is a Palindrome or not. Use Pointers to traverse the string.
Python code. No use of def() or return.
7a)Create a program that asks the user for their full name (first, middle, and last). You can assume that compound names, such as Jamie-Lynn are joined by a hyphen, that names are separated by a space and that the user enters their data in the correct format. The program should then separate the first name, middle name, and last name from the single string entered by the user and save each piece...