Question

Given the string A=’Aggie Engineers Rock And Are In High Demand By Industry. Write the Python code to prepare a list of the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please comment, if you need any corrections.Please give a Thumps up if you like the answer.

Program

#Input string
A = 'Aggie Engineers Rock And Are In High Demand By Industry'
  
# Printing original string
print ("The original string is : " + A)
  
# To extract words from string,use split()
res = A.split()
  
# Printing result
print ("The list of words are : " ,*res,sep="\n")

Output

The original string is : Aggie Engineers Rock And Are In High Demand By Industry
The list of words are :
Aggie
Engineers
Rock
And
Are
In
High
Demand
By
Industry

Screenshot

#Input string A = Aggie Engineers Rock And Are In High Demand By Industry # Printing original string print (The original s

Add a comment
Know the answer?
Add Answer to:
Given the string A=’Aggie Engineers Rock And Are In High Demand By Industry'. Write the Python...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • IN PYTHON 3) Number of Words Write a function numWords() which takes in a string can...

    IN PYTHON 3) Number of Words Write a function numWords() which takes in a string can prints the number of words in the string. You can assume that words will only be separated with spaces, commas, and periods. "hello, world" -> 2 "this is cool" -> 3 4) Is Sorted Write a function isSorted() which takes in an list of integers and returns true if the numbers are sorted from smallest to largest.

  • plz answers these short Qs in python language Q1-Given the String variable address, write an expression...

    plz answers these short Qs in python language Q1-Given the String variable address, write an expression that returns the position of the first occurrence of the String "Avenue" in address. Q2-Write a sequence of statements that finds the first comma in the string associated with the variable line, and associates the variable clause the portion of line up to, but not including the comma. Q3-Assume that sentence is a variable that has been associated with a string consisting of words...

  • Python 3.0 Please Write a function that takes, as arguments, a binary string, a list of...

    Python 3.0 Please Write a function that takes, as arguments, a binary string, a list of characters and the corresponding Huffman code for those characters. It decodes the binary string using the Huffman code, and returns the resulting decoded string. Name this function decodeStringHuffman(binaryString, myCharacters, myCode). For example, >>>decodeStringHuffman("1001100010111010101010111", ["A", "B", "C"], ["1", "00", "01"]) should return the string 'ABAABCCAACCCCCAA'

  • Write a program in PYTHON that takes a string and an integer as inputs from the...

    Write a program in PYTHON that takes a string and an integer as inputs from the user, and then prints a new string that contains the letters from the original string “rotated” by the given amount. For example, “cheer” rotated by 7 places gives the word “jolly” and “melon” rotated by -10 gives the word “cubed.” Use built-in function: ord() to convert a character to a numeric code and chr() to convert numeric code to character.

  • **IN PYTHON** Given a range from 10-50, write a code in python that shows how many...

    **IN PYTHON** Given a range from 10-50, write a code in python that shows how many odd and even numbers there are, and list them out.

  • plz run this python code & display the results Write a python funciton alphabetic(val) that takes...

    plz run this python code & display the results Write a python funciton alphabetic(val) that takes a string as input and returns True if the words in the sentence appear in alphabetic order, and False otherwise. Note repeated words are allowed. >>> alphabetic("the sun is bright") False

  • Write a Python code that asks a string from the user and prints only the lower...

    Write a Python code that asks a string from the user and prints only the lower case letters in that string

  • Create a function called countWords(string): That will count words in given string by user. Use Python...

    Create a function called countWords(string): That will count words in given string by user. Use Python 3.6 If user inputs "Mary had a little lamb" it should return 5

  • 1. Please write the following code in Python 3. Also, please write code and not psedo-code....

    1. Please write the following code in Python 3. Also, please write code and not psedo-code. 2. Please also share your code and show all outputs. Write code that uses the string stored in org and creates an acronym which is assigned to the variable acro. Only the first letter of each word should be used, each letter in the acronym should be a capital letter, and there should be nothing to separate the letters of the acronym. Words that...

  • Write a program in python that lets the user play the game Rock, Paper, Scissors against...

    Write a program in python that lets the user play the game Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. 2 corresponds to paper, and 3 corresponds to scissors. To set up the random number library, write the following at the top of your code: import random random.seed(300) Use...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT