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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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