Question

Design a function, called nametag, that consumes someone's name and produces ;; an image of a...

Design a function, called nametag, that consumes someone's name and produces
;; an image of a nametag for that person. The nametag should be circular and
;; display the name, but beyond that you can design what it looks like.

-Use DrRacket program, in BSL

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//Here is the code //

// I have used DrRacket Program and BSL language as asked//

// The output of the code is also attached below//

(require 2htdp/image)
(define (nametag x)(overlay
(text x 18 "red")
(square 140 "outline" "red")
(circle 70 "solid" "white")
(circle 75 "solid" "orange")
(circle 80 "solid" "white")
(circle 85 "solid" "orange")
(circle 90 "solid" "white")
(circle 100 "solid" "orange")
  
)
)

(nametag "Persons Name")

//Here is the output of this code//

// The design can also be modified just by changing the overlay lines.//

// (2htdp/image) This is the attachment needed to process image based programming in DrRocket. In the first line i imported it .//

//If you have any queries you can comment and i will try to answer.//

Add a comment
Know the answer?
Add Answer to:
Design a function, called nametag, that consumes someone's name and produces ;; an image of a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • HtDF Lab, Problem 2 PROBLEM: Design a function named underline that consumes an image ;and produces...

    HtDF Lab, Problem 2 PROBLEM: Design a function named underline that consumes an image ;and produces that image underlined by a black line of the same width. For example, (underline (circle 20 "solid" "green")) should produce ;(above (circle 20 "solid" "green" rectangle 40 2 "solid" "black"))

  • its in mobile programing Design a Navigation Drawer Activity which has one menu item called “Cinemas"....

    its in mobile programing Design a Navigation Drawer Activity which has one menu item called “Cinemas". When user clicks the "Cinemas" menu item. The application navigates to "Cinemas" fragment which contains a recycler view of cinemas in Jordan. It looks like the following, TAJ Taj Cinemas Info TA Taj Cinemas Info Taj Cinemas Info Notes: 1. Include several cinemas such as Taj Cinemas, Grand Cinemas, Prime Cinemas. You can take the logo from ammancinemas.com 2. You don't have to program the functionality behind...

  • C++ Assignment: Create a class called FitnessMember that has only one variable, called name. The FitnessMember...

    C++ Assignment: Create a class called FitnessMember that has only one variable, called name. The FitnessMember class should have a constructor with no parameters, a constructor with a parameter, a mutator function and an accessor function. Also, include a function to display the name. Define a class called Athlete which is derived from FitnessMember. An Athlete record has the Athlete's name (defined in the FitnessMember class), ID number of type String and integer number of training days. Define a class...

  • Question2 uses structured design implemented in C. Array of records (structs) with file I/O is needed....

    Question2 uses structured design implemented in C. Array of records (structs) with file I/O is needed. The program takes two inputs at a time. The name of a person, and, the coin value as an integer in the range 5 to 95. Input coin values should always be divisible by 5 (integer division). Names are one word strings. An example input is: Jane 30 This input line indicates that 30 cents change is to be given to Jane. Output change...

  • Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anythi...

    Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anything. No code outside of a function! Median List Traversal and Exception Handling Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options 50% below 50% above Add a number to the list/array...

  • C++ There is a class called Person which has name and age as private variables. Another...

    C++ There is a class called Person which has name and age as private variables. Another class called Student, which is derived from person with gpa and id as variables. name is a string, age and id are integers and gpa is a double... All of them are private variables. age, gpa and id should be generated randomly when the object is created with the following ranges: age 20 to 32 gpa 0.0 to 4.0 // this one is tricky...

  • *** C++ *** Create a class called Student that contains a first name ( string) and...

    *** C++ *** Create a class called Student that contains a first name ( string) and an student id number (type long).     1. Include a member function called get_data( ) to get data from the user for insertion into the object,     2. Also include a function called display_data( ) that displays the student data. Then write a complete program that uses the class to do some computation. Your main function, main( ), should create a Dynamic Array of...

  • Python Language ! Use the Design Recipe to define a function save_history which consumes two parameters,...

    Python Language ! Use the Design Recipe to define a function save_history which consumes two parameters, a nested list and an int representing the current landing attempt. The function should open a new file named LandingNN.csv' where NN is two digits representing the current landing attempt. The first line should contain the number of sublists in the nested list. Each sublists should be written to the file on its own line with its values separated by commas. This function should...

  • PYTHON 3 - please show format Question 2. ) Use the Design Recipe to write a...

    PYTHON 3 - please show format Question 2. ) Use the Design Recipe to write a function yesOrNo which has no parameters. When called, it gets input from the user until the user types either 'yes' or 'no', at which point the function should return True if the user typed 'yes' and False if the user typed 'no'. Any other entries by the user are ignored and another value must be input. For example: Test Input Result print(yesOrNo()) hello blank...

  • You're to write a C++ program that analyzes the contents of an external file called data.txt....

    You're to write a C++ program that analyzes the contents of an external file called data.txt. (You can create this file yourself using nano, that produces a simple ASCII text file.) The program you write will open data.txt, look at its contents and determine the number of uppercase, lowercase, digit, punctuation and whitespace characters contained in the file so that the caller can report the results to stdout. Additionally, the function will return the total number of characters read to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT