Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

we are using clojure btw, having trouble with questions 3, 4, 5, 6 and 7 1. (str 123) 2. (str (1 231) 3. (str (vec

we are using clojure btw, having trouble with questions 3, 4, 5, 6 and 7
image text in transcribed
1. (str 123) 2. (str (1 231) 3. (str (vec "hello) 4. (str hle) Task 2-Functions with one parameter For the rest of these tasks, include with the function at least two tests below it. 1. Write a function that takes one parameter x and adds 5 to the number. 2. Write a function that takes one parameter x and multiples the number by 2. 3. Write a function that takes one parameter x and adds 5 and then multiplies by 2. For example, 6 becomes 22. Write this function in two different ways: one using + and", and one without using + and . 4. Write a function push-out that takes a number and pushes it one step further away from 0:4 becomes 5, -6 becomes -7, and becomes 0 (because there's nothing else it could be]. Hint: You will need to use the il special form 5. Write a function pixels that takes a number and returns a string with "px" after the number, like this: 1 becomes "1px". 6. Write a function greet that takes in a person's name and says "Hinto the person: "George" becomes "HI George 7. Write a function greet2 that works just like greet, except that if the person's name is empty. it responds with "Hi there". An empty string literal looks like this: ". You can test whether a string is empty using the empty? function. Task 3-Functions with two parameters

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

Give feedback effectively and receive it appropriately.

Answered: 1 week ago