python coding 9

1. Write a Python function to get the first half of a specified string of even length. Suppose the input string is “Python”, after calling the function, we should see the output “Pyt”.

2. Write a Python program which prompts the user to create a user account and checks whether the provided user name and password are legal.

Note: a user name should start with a letter and only consists of letters and numbers. The length should be between 6 and 12; a password should start with a letter and only consists of letters, numbers and the underscore symbol “_”. The length should be between 8 to 16.

3. Write a Python program to print the numbers of a specified list after removing even numbers from it.

4. Write a Python program to add ‘ing’ at the end of a given string. If the given string already ends with ‘ing’, add ‘ly’ instead. If the string length of the given string is less than 3, leave it unchanged.

Sample string: ‘abc’

Expected output: ‘abcing’

Sample string: ‘string’

Expected output: ‘stringly’

Sample string: ‘oh’

Expected output: ‘oh’

5. Print a line of all the capital letters “A” to “Z”. Below it, print a line of the letters that are 13 positions in the alphabet away from the letters that are above them. For example, below the “A”, you print an “N”, below the “B”, you print an “O”, etc. You have to
consider the alphabet to be circular, i.e., after the “Z”, it loops back to the “A” again.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
ORDER NOW