SOB 35 – (Block 2 – material covered in Week 13) Write a function that takes a number n as input, and output n lines displaying i times the value i at the ith line. For instance, (sob35 6) should output: 1 22 333 4444 55555 666666 Please make sure to test your function and to explain how your code works.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

I have 4 question 25,27,35,34

that solves a problenm using
some code to iliustrate your points. E.g., If you have
lists, then you can say why you can/can't use vectors for it or sets etc.
SOB 23 – (Block 2 – material covered in Week 9)
Build each of the following lists using just cons and the empty list (e.g. '(1 2 3) is (cons 1
(cons 2 (cons 3 ()))). Provide a diagram for each of them. These can be drawn on paper.
• '^ ( 3 2 )))
34 (5)))
3)))
11!12)) 3 4)
2 of 2
4.
SOB 25, 27 – (Block 2 – covered in Week 11)
1. Define a struct type to represent a holidaymaker with a name, id, flights, hotel,
upgrade.
2. Define five named instances, e.g., “Tom Fields", 1234, 350, 800, #t.
3. Write a function that computes the price needed for a flight upgrade and updates
the points collected. The function takes as argument a holidaymaker struct instance,
and if the upgrade field is true, add an extra 20% to the current flight price and
stores the result in the flights field. E.g., give the following instance “Tom Fields",
1234, 350, 800, #t, the function will update the flights field with 420. Explain what
the difference between mutable and immutable is.
4. (SOB 35/102) Store in a list 5 instances of holidaymaker. Write a function that takes
as argument a list of instances of holidaymakers and prints a list of names of
holidaymakers that spend more than 2000 pounds in total for both their flights and
hotels.
Make sure to test your code and to explain how it works.
SOB 35 – (Block 2 – material covered in Week 13)
Write a function that takes a number n as input, and output n lines displaying i times the
value i at the ith line. For instance, (sob35 6) should output:
1
22
333
4444
55555
666666
Please make sure to test your function and to explain how your code works.
SOB 34 - (Block 3 – web application handout)
Implement a web server using Racket for a converter from miles to kilometers. The web
server should allow a user to enter an amount in miles and convert it to kilometers.
Transcribed Image Text:that solves a problenm using some code to iliustrate your points. E.g., If you have lists, then you can say why you can/can't use vectors for it or sets etc. SOB 23 – (Block 2 – material covered in Week 9) Build each of the following lists using just cons and the empty list (e.g. '(1 2 3) is (cons 1 (cons 2 (cons 3 ()))). Provide a diagram for each of them. These can be drawn on paper. • '^ ( 3 2 ))) 34 (5))) 3))) 11!12)) 3 4) 2 of 2 4. SOB 25, 27 – (Block 2 – covered in Week 11) 1. Define a struct type to represent a holidaymaker with a name, id, flights, hotel, upgrade. 2. Define five named instances, e.g., “Tom Fields", 1234, 350, 800, #t. 3. Write a function that computes the price needed for a flight upgrade and updates the points collected. The function takes as argument a holidaymaker struct instance, and if the upgrade field is true, add an extra 20% to the current flight price and stores the result in the flights field. E.g., give the following instance “Tom Fields", 1234, 350, 800, #t, the function will update the flights field with 420. Explain what the difference between mutable and immutable is. 4. (SOB 35/102) Store in a list 5 instances of holidaymaker. Write a function that takes as argument a list of instances of holidaymakers and prints a list of names of holidaymakers that spend more than 2000 pounds in total for both their flights and hotels. Make sure to test your code and to explain how it works. SOB 35 – (Block 2 – material covered in Week 13) Write a function that takes a number n as input, and output n lines displaying i times the value i at the ith line. For instance, (sob35 6) should output: 1 22 333 4444 55555 666666 Please make sure to test your function and to explain how your code works. SOB 34 - (Block 3 – web application handout) Implement a web server using Racket for a converter from miles to kilometers. The web server should allow a user to enter an amount in miles and convert it to kilometers.
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY