Write a function called tallenough

Assignment Help Basic Computer Science
Reference no: EM131158202

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.

Reference no: EM131158202

Questions Cloud

Explain distributed file system : Explain Distributed File System (DFS) and give its key processes. Please reply as soon as possible?
Loss of productivity and significant costs : Interruptions to business functions can result in a loss of productivity and significant costs. Careful planning can often help avoid security incidents. However, even with planning, such incidents cannot always be prevented. Therefore, as a secur..
Identify a message in advertising : Identify a message in advertising. Describe how you perceive the message of the advertisement. Try to determine the reality of the advertisement. Distinguish between your perception and the reality of the message
How would you classify operating systems : How would you classify operating systems. Give at most five classifications
Write a function called tallenough : (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 str..
What is the break-even quantity in this case : Suppose the Chinese subcontractor is willing to share the economies-of-scale benefits it might achieve in production and offers an incremental quantity discount on the variable cost. The subcontractor now charges $6 per unit for the first 0.5 mill..
How do you think biracial people should be counted : In other words, if future hiring is meant to make the workforce relatively proportionate to the population's racial mix, should workers who are, for example, offspring of an African-American mother and a Caucasian father be counted as White, Afric..
Separate sets of ordered pairs : Let sets A and B be defined as follows: A = {a1} and B = {b1, b2}. List as separate sets of ordered pairs all the one-to-one functions from A to B, or explain why there are no such functions.
How do environmental systems relate to human systems : How do environmental systems relate to human systems? Can you compare ecology to human ecology? If so how? How does climate determine biomes?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine probability that contention ends on round k

Determine the probability that a contention ends on round k, and what is a mean number of rounds per contention period?

  Address three components represented in cell

Assume that a security model is needed for protection of information in your class. Write a brief statement on how you would address the three components represented in that cell.

  Provide conditional processing

What are the two XSLT elements that provide conditional processing? Describe how the functionality provided by these two elements differs.

  Linear programming problem using branch and bound

Solve this linear programming problem using Branch and Bound

  Find pythagorean triplets

Given an array of integers, find Pythagorean triplets. i.e. find a,b and c which satisfies a^2 + b^2 = c^2 Integers could be positive or negative.

  How do you define a constructor in java

How do you call Inherited Class Members in Java? Provide an example.

  Which of the following is not a join in sql

Which of the following is not a join in sql?

  Write code to assign to the variable

Write code to assign to the variable format a formatting string that will display three values referenced by the variables quantity

  Define an intelligent network

Briefly define an "intelligent" network and a "stupid" network. Why is the Internet a stupid network? How do the two types differ in terms of security and privacy qualities?

  Assignment on modeling a game using turing machine

Modeling a Game Using Turing Machine, Select a game that can be modeled by a simple Turing machine. It should take a series of inputs (such as a set of moves by a player) and use the tape and table to compute the outcome of whether the player won ..

  Demonstrate ascii code conversion

To demonstrate the use of subroutines, e.g. initialize the peripheral registers and to set the time delays, etc. To demonstrate ASCII code conversion. To demonstrate the use of indexed addressing to retrieve data from a table in memory.

  Design and implement a class that allows a teacher to track

Design and implement a class that allows a teacher to track the grades in a single course. Include methods that calculate the average grade, the highest grade, and the lowest grade. I use C# and visual studio 2012

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd