Help needed related python ! Thanx :)
#First let's ask the user for one of their favorite book.
# Now let's use concatenation to ask who wrote this book.
# Create an empty dictionary to hold the favorite books and
authors.
# Use a for loop to prompt the user to enter 5 of their favorite
books.
# A general structure is given below.
for book in favorite_book range(5):
print (book)
favorite_book = input("What is one of your favorite books? ") #
Prompt for a favorite book.
favorite_author = input("Who is the author of "+ favorite_book +"?
") # Prompt for author of the book.
# Add the favorite book & author to the favorite_books
dictionary.
# The book title is the key, the author is the value.
# favorite_books[...] = ...
# Here is the list title.
print("A list of my favorite books, a.k.a. books I can recommend to
others!")
# Complete the following for loop to print out the
dictionary.
# Here is what a print out should look like:
# "Oryx & Crake" by Maragaret Atwood
Screenshots of program and output:
Program:
Output:

Help needed related python ! Thanx :) #First let's ask the user for one of their...
urgent Help needed in python program ! Thanx # This is a function definition. You can ignore this for now. def parse_integer_list_from_string(string): """ Returns a list of integers from a string containing integers separated by spaces. """ # Split the line into a list of strings, each containing a number. number_string_list = string.split() # Create an empty list to store the numbers as integers. numbers = [] # Convert each string to an integer and add it to the list...
PYTHON Ask the user for an integer number n. Construct, using one single loop, the list with the values [1,2,3,4,…,n] and the list with the values [1^2 ,2^2 ,3^2 ,…n^2 ] by using list concatenation ). After this loop is over, use a separate loop to show the user the two results by printing corresponding elements from the two lists in the same line, as follows: 1 1 2 4 3 9 … …
In Python !!!
In this exercise you will continue to work with Classes and will build on the Book class in Lab 13.10; you should copy the code you created there as you will need to extend it in this exercise. You will extend the Book class to accommodate the case where there may be multiple authors for a book. The attribute author should become a list. The constructor will still take a parameter that is a string for author,...
PYTHON CODING
Create a program that prompts the user twice. The first prompt should ask for the user's most challenging course at Wilmington University. The second prompt should ask for the user's second most challenging course. The red boxes indicate the input from the user. Your program should respond with two copies of an enthusiastic comment about both courses. Be sure to include the input provided by the user to display the message. There are many ways to display a...
For Python 3.8! Copy and paste the following bolded code into IDLE: movies = [[1939, 'Gone with the Wind', 'drama'], [1943, 'Casablanca', 'drama'], [1965, 'The Sound of Music', 'musical'], [1969, 'Midnight Cowboy', 'drama'], [1972, 'The Godfather', 'drama'], [1973, 'The Sting', 'comedy'], [1977, 'Annie Hall', 'comedy'], [1982, 'Ghandi', 'historical'], [1986, 'Platoon', 'action'], [1990, 'Dances with Wolves', 'western'], [1992, 'Unforgiven', 'western'], [1994, 'Forrest Gump', 'comedy'], [1995, 'Braveheart', 'historical'], [1997,...
Please help with this exercise on Python program involving the use of dictionary. ### This exercise involves building a non-trivial dictionary. ### The subject is books. ### The key for each book is its title ### The value associated with that key is a dictionary ### ### In that dictionary there will be Three keys: They are all strings, they are: ### ### "Pages", "Author", "Publisher" ### ### ### "Pages" is associated with one value - an int ### ###...
Using GUI to ask user for an alphabet input and to graphically display the hangman. During each round, the player will enter an input, and the program will display the hangman accordingly to the input. Main method with a loop that will provide a hint and prompt the user for an input after each round. String getWord() method returns a random word from our list to use for the game. Void hangman(String guess) method that will receive the user input...
VERY URGENT*** THANK YOU IN ADVANCE: THIS IS THE CODE I HAVE GOTTEN SO FAR: PYTHON This is a code that is supposed to help someone study/ practice for jeopardy. The two functions described below are required for this assignment. You may add other functions that you think are appropriate: menu() This function, which displays all the user options to the screen, prompt the user for their choice and returns their choice. This function will verify user input and ALWAYS...
Help needed related python ! Thanx
6. What makes the exclusive-or the most interesting of the logic operations in Boolean algebra? (Hint: try them and see.) 7. The How Computers Work Part III video from Week 1 talks about assembly level abstraction. Why is it better than machine code? Why is the assembly level abstraction still not abstract enough? Give the 2300 year old algorithm by Euclid for finding the greatest common divisor which is: 8. 9. Get two positive...
Problem 4 (DOM operations - 30 points): Consider the Python code snippet bookstore.py for DOM operation, some basic methods and properties and an xml file on bookstore which we discussed this week. Wite two func- tions; First, write a recursive Python function get_text(elm) to extract all the text of a dom tree pointed by elm. For example, get_text(elm), where elm=<bookstore>, will return [[u'Emacs User Manual', u'Richard Stallman', u'1980', u'12.00'], [u'Timeline', u'Michael Chricton', u'1999', u'15.00'], [u'Catch 22', u'Joseph Heller', u'1961', u'20.00'],...