Write a function that takes a list of strings

Assignment Help Computer Engineering
Reference no: EM133627438

Haskell -wryte Haskell code and provide a screenshot of your results

Question 1. A function that prints the word "Even" if a parameter passed to the function is even otherwise print the word "Odd".

Question 2. A function that returns the average of 3 numbers (not in a list)

Question 3. write a Haskell function that asks the user for their Name and then prints "Happy Birthday x!!!" where x is their name.

Question 4. write a function that takes a list of strings and another string as parameters. Your function should return a new list with the string appended to the list.

Question 5. write a function that takes a list and prints out all the items in the list.

Question 6. write a recursive function that takes a list and returns the sum of the items in the list.

Question 7. Use a list comprehension to return all the numbers greater than 30 and less than 50 in a list of all even numbers from 0 to 100.

Question 8. write a Haskell function that removes the punctuation and spaces in the following statement. "I am the Lorax, I speak for the trees... Now thanks to your hacking my trees to the ground. There's not enough Truffula fruit to go round!!!"

Use a let statement in main to hold the quote.

Question 9. write a function that uses guards to calculate movie ticket prices. Child tickets cost $7.50, adult tickets are $13.50, and senior tickets are $8.00. The main program should ask which type of ticket the user wants - hard code the number of tickets to avoid the string to int conversion which varies from compilers.

Reference no: EM133627438

Questions Cloud

Select some professional ways to refuse service : Select some professional ways to refuse service that minimise confrontation. Select THREE (3) answers. "I'm sorry, unfortunately you are starting to show signs
Recall that you can query the help file for a data set : Use the following code to load in the Teams dataset from the Lahman database. Recall that you can query the help file for a data set by running
Differences in policy priorities : Briefly desrcibe the arugment and evidence in candis watts smith's book to characterize the similarities and differences in policy priorities
Define an objective for each test case : Define an objective for each test case. Document a logical set of inputs (along with their corresponding expected results) for each test case
Write a function that takes a list of strings : write a function that takes a list of strings and another string as parameters. Your function should return a new list with the string appended to the list
War on terror : What do you believe the role of the media is in the "War on Terror?" Why? Do you believe that the terrorism and the media have a symbiotic relationship
Apply ethics in computing profession : A mature profession has eight attributes that enable it to certify new members and support existing members. List them and explain each attribute
Describe the war experience for african-americans : Describe the war experience for African-Americans. How did they expect America to change for them after the war?
Summariize the key findings of yourr participating companies : Summariize the key findings of yourr participating companies/organizations in light of ISCMM levels. (Maximum 250 woords). Learning Outcome 1: Apply effective

Reviews

Write a Review

Computer Engineering Questions & Answers

  Prompt for and read numbers into an array

The array should be big enough to hold 20 numbers. You keep reading until the user enters a negative number. You should then print the numbers they entered.

  Which customer data was stolen from a system

Isabelle is a security investigator for her company. The company recently suffered a security breach in which customer data was stolen from a system.

  What are the largest and the smallest number of vertices

If the height of a 2-tree is 3, what are (a) the largest and (b) the smallest number of vertices that can be in the tree?

  Does sql server support encryption and if so at what level

Does SQL Server support encryption and if so at what level? What are some of the best practices regarding database account security

  Why the new approach is better than the other six kernels

How the result of each one is different from the other. Why the new approach is better than the other 6 Kernels.

  Briefly describe the osi reference model

Briefly describe the OSI reference model and the TCP/IP networking model, use diagrams to show the relation between both these models.

  How would you go about figuring out which results

How would you go about figuring out which results you would determine needed to be fixed first and which ones were more critical than others.

  One control against accidental software deletion

One control against accidental software deletion is to save all old versions of a program. Of course, this control is prohibitively expensive in terms of cost of storage. Suggest a less costly control against accidental software deletion. Is your ..

  Technology assumption and analyzing the system

Which businesses and services would no longer be required if the perfect technology assumption were a reality for automobile? Explain how does the perfect technology assumption help with analyzing the system?

  How the various aspects of customer-driven business involve

Distinguish how the various aspects of customer-driven business involve and affect SCM, CRM, and ERP systems.

  Develop a better understanding as to how data shapes

DS 650 Saint Peter's University develop a better understanding as to how data shapes our world. One last question to consider: Is data controlling our lives?

  What is response time

What is response time

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