Function two-way if statement write a function called


Im stuck on 3 practice problems below:

The Progamming Language is Python

1) (for loop, one-way if statement) Write a program that prints all the composers in the list that do not have a double name. Hint: assume that a composer with a double name contains a space ' ' (single space) or a hyphen '-'.

lst = ['Antheil', 'Elgar', 'Saint-Saens', 'Chadwick', 'Coleridge-Taylor', 'Charlie Parker', 'Castelnuovo-Tedesco']

2) (function, two-way if statement) Write a function called tallEnough() that takes a single parameter, the user's height in inches. If the height is 48 or more, the function should return "You can go on this ride." Otherwise it should return the string "Sorry, you're not tall enough."

3) (Strings and Formatted Output) If you've ever visited Europe (or Canada) you'll know that they tend to measure temperature in degree Celsius rather than Fahrenheit. Conversion is pretty simple: if f is the temperature in degree Fahrenheit, then the temperature in degree Celsius is c = (f-32)*5/9.

a. Write a function convert() that takes as an input degree Fahrenheit and returns degree Celsius.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Function two-way if statement write a function called
Reference No:- TGS01541497

Now Priced at $15 (50% Discount)

Recommended (95%)

Rated (4.7/5)