Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with these two question must be worked on in python Question 1 :( 40 points ) Write a program to print the lyrics

Need help with these two question must be worked on in python

Question 1:( 40 points )

Write a program to print the lyrics of the song Old MacDonald. One Stanza of the song is given below. As you know there are two more stanzas with a different animal and sound (instead of the cow and the moo). Your python program should print the lyrics for three different animals and their respective sounds using one function, similar to the example verse below:

(Clue: Write a function that takes two arguments the animal name and the sound it makes)

Old Macdonald had a farm, E-I-E-I-O And on his farm he had a cow, E-I-E-I-O With a "moo-moo" here and a "moo-moo" there Here a "moo" there a "moo" Everywhere a "moo-moo" Old Macdonald had a farm, E-I-E-I-O

Question 2 ( 60 points )

Write a program in Python using nested loops that asks the user to enter a value for the number of rows (n) to display. It should then display that many rows of pound signs, with one pound sign in the first row, two in the second row, and so on and n pound signs in the last row where n is the input number. The program should be able to run for any value of n. A sample run would look like this where n = 5:

Enter number of rows: 5 # ## ### #### #####

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago