Create a function that pulls a picture from a URL and creates a thumbnail saved…

Create a function that pulls a picture from a URL and creates a thumbnail saved on your local machine.

Since this assignment specifies the picture should be saved as a “thumbnail,” the full answer should include a function that decreases the image to a thumbnail size (saveThumbnail2). However, if the picture pulled from a URL was a thumbnail originally, your function should just save the image without resizing (saveThumbnail1).

Review the program presented in Ch. 13.2 Program 163, “Writing Programs to Generate HTML,” of Introduction to Computing and Programming in Python.

Zip your Python .py file and submit the.zip file so the code can be validated.

 

2.

Given a folder with images in it, create an HTML page named index.html that contains links to each JPEG file in the directory as follows:

Write a function that creates a string of the path to a directory.
Generate a thumbnail (half the size) copy of each image.
Use makeEmptyPicture to create a blank picture in the correct size, then scale down the original picture into the blank picture.
Name the new image “half-” + the original filename (e.g., if the original filename was fred.jpg, save the half-size image as half-fred.jpg). The anchor in the link to each full-size picture should be the half-size image.

Review Ch. 13, “Making Text for the Web,” of Introduction to Computing and Programming in Python.

Zip your Python .py file and submit the.zip file so the code can be validated.

Answers

Related Questions

None...

Assessment/Interview Select a community of interest. It is important that the community selected be one in which a CLC group member currently resides....

None...

Select a health topic of interest to you that is relevant to your current area of practice. The topic may be your Course Portfolio Project or a differ...

None...

Since the inception of the HITECH Act, health organizations have faced increased pressure to update their health information technology (HIT) resource...

None...

TOBACCO PREVENTION AND CONTROL PROGRAM, Goal,Reduce the incidence of lung cancer in adult residence of San Diego.Improve health of the adult users in...

None...

Since the inception of the HITECH Act, health organizations have faced increased pressure to update their health information technology (HIT) resource...

None...

To prepare: · Review the information in Chapter 10 of the course text on rigor and validity. · Read the method section of one of the following quasi...

None...

Here’s the instructions: -Write a research paper about Hopi Tribe, ending with a 5-7 page paper which includes MLA citations and a Works Consulted w...

None...

Review the Debate Issue on page 192. Describe the pros and cons of each stance described. Your answers should total two to three paragraphs for each s...

None...

HUM1001 History of Art through the Middle Ages SU01 Artistic Change in Sculpture Relative to human history, the period covered in this week’s study...

None...

Complete Journaling Activity 6-1 on pg. 188. Answer all 3 questions using the assessment tools found in the chapter and document your findings to be h...

None...

Career Research and Preparation Presentation   Instructions:   Return to the website for the Society for Technical Communication https://www.stc.org...

None...

To prepare: · Review the information in Chapter 10 of the course text on rigor and validity. · Read the method section of one of the following quasi...

None...

Psychiatric Nursing plagiarism must be less than 15% . i need the assignment is 11 hours. Assignment: Assessing and Treating Clients with With Bipolar...

None...

The U.S. Department of Health & Human Services released a comprehensive Clinical Practice Guideline for Treating Tobacco Use and Dependence–2008 Up...

None...

A 56-year-old male was brought to the emergency room with a chief complaint was right flank pain. History of present Illness: One day prior to admis...

None...

This week for your discussion, select a product type and particular brand of that product to study – it can be in any product category you choose. G...

None...

psychoanalysis refers to a comprehensive theory about human nature and not to the psychotherapeutic approach. What new principles and values did th...

None...

Health Assessment Strategies in Professional Practice As part of your Unit 3 assignment, you will be asked to conduct an assessment of a particular po...

None...

What, according to you, did that person do to create negative situations? What was your or the subordinate’s attitude toward the person in that part...

None...

Using Evidence-Based Health Assessments During your BSN program, you have been introduced to the importance of using an evidence-based model for pract...

None...

. Between 2005 and 2008​, the average rate of inflation was about 3.6​% per year. If a cart of groceries cost ​$110 in​ 2005, what did it cost...

None...

Behaviorism and psychoanalysis  (or psychodynamic theory—not the psychotherapy approach) are sometimes  considered theoretically opposite. However...

None...

1.Initial Assessment Discuss the important elements of an initial assessment of a client. What are some questions you want to be sure to ask? Discuss...

None...

Conduct a health assessment of a particular population and create an audience-appropriate PowerPoint presentation in which you distribute the results...

If you didn't find the right answer

Ask Your Questions, We'll notify you once someone answers it