Question

Hi can i get answer of the given question please Pythonize is a new language, that...

Hi can i get answer of the given question please

Pythonize is a new language, that is similar to English, however the first letter of each word in Pythonize is moved to the end. Furthermore, each word in this new language ends with ‘py’. Write a program that takes an English word as an input and prints the Pythonize equivalent on the screen. (Save your script as pythonize.py and pythonize.txt)
For example:
If the input is: "Python"
The output would be: Ythonppy

Homework Answers

Answer #1
word = input("Enter a word: ")  # read a word from user

# let's assume word is Python
# word[1:] gives ython
# word[0] gives P
# so, word[1:] + word[0] + "py" gives ypthonPpy
# then capitalize function converts first letter to uppercase and all other letters to lowercase
# so, (word[1:] + word[0] + "py").capitalize() gives Ythonppy
python_word = (word[1:] + word[0] + "py").capitalize()

print(python_word)  # print python word

Python Ythonppy Process finished with exit code 0

Please let me know if you have any doubts Please upvote this answer. Thanks!!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
hi can i please get the answer of this question? Write a python program that calculates...
hi can i please get the answer of this question? Write a python program that calculates the average of numeric values in a string and ignores all other characters. Your program must print the sum and average on the screen. (Save your script as spotNumbers.py and spotNumbers.txt) For example: If the input is: myString= "Biology = 66.0 Python = 90.0 Economics = 80.0 Statistics = 70.0" The output wound be: Sum= 306.0 Average= 76.5 Hint: Consider using type build-in function...
Question 1: Haigy Paigy is as a children's invented language which sounds exactly like English, except...
Question 1: Haigy Paigy is as a children's invented language which sounds exactly like English, except that “aig” is inserted before the vowel sound of each syllable. E.g., the English word “hello” becomes “haigellaigo” in Haigy Paigy. Write a set of regular expressions that will automatically translate sentences from English into Haigy Paigy. The input of your program will be a string containing one English sentence. Your regular expressions should translate this sentence into Haigy Paigy. Simplifications: only vowels can...
Use the Python programming language to complete below (I need the New Answer for this, and...
Use the Python programming language to complete below (I need the New Answer for this, and please provide the screenshot of the source code. Thank you!): Write a program to input an uncertain string S of words and space/tab Remove space/tab in S Remove identical words Sort all words in the order of a-z Print the output strings Example: Input String: "hello world and practice makes perfect and hello world again" Output String: "again and hello makes perfect practice world"...
Please write a program that reads the file you specify and calculates how many times each...
Please write a program that reads the file you specify and calculates how many times each word stored in the file appears. However, ignore non-alphabetic words and convert uppercase letters to lowercase letters. For example, all's, Alls, alls are considered to be the same words. What is the output of the Python program when the input file is specified as "proverbs.txt"? That is, in your answer, include the source codes of your word counter program and its output. <proverbs.txt> All's...
(PLEASE USE C++) (PLEASE USE THE EXAMPLE GIVEN) Question 1: [10 pointes] the input file inFile.txt...
(PLEASE USE C++) (PLEASE USE THE EXAMPLE GIVEN) Question 1: [10 pointes] the input file inFile.txt stores a number of words with possible replication. Each word is stored on a separate line. The number of words within inFile.txt is stored as the first line in that file. Write and test a program that reads the words from inFile.txt and prints them in outFile.txt  without replication as well as the number of replication for each word. Hint: to implement the above program,...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
** Language Used : Python ** PART 2 : Create a list of unique words This...
** Language Used : Python ** PART 2 : Create a list of unique words This part of the project involves creating a function that will manage a List of unique strings. The function is passed a string and a list as arguments. It passes a list back. The function to add a word to a List if word does not exist in the List. If the word does exist in the List, the function does nothing. Create a test...
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may...
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may be given a list of raw email addresses and be asked to generate meaningful information from such a list. This project involves parsing such a list and generating names and summary information from that list. The script, eparser.py, should: Open the file specified as the first argument to the script (see below) Read the file one line at a time (i.e., for line in...
C++ Pig Latin Lab This assignment uses pointers to perform something done often in computer applications:...
C++ Pig Latin Lab This assignment uses pointers to perform something done often in computer applications: the parsing of text to find “words” (i.e., strings delineated by some delimiter). Write a program that encodes English language phrases into Pig Latin. Pig Latin is a form of coded language often used for amusement. Many variations exist in the methods used to form Pig Latin phrases. Use the following algorithm: to form a Pig Latin phrase from an English language phrase, tokenize...
Program Behavior Each time your program is run, it will prompt the user to enter the...
Program Behavior Each time your program is run, it will prompt the user to enter the name of an input file to analyze. It will then read and analyze the contents of the input file, then print the results. Here is a sample run of the program. User input is shown in red. Let's analyze some text! Enter file name: sample.txt Number of lines: 21 Number of words: 184 Number of long words: 49 Number of sentences: 14 Number of...