Question
Do all of this in python no C++ or C language provide both the source code and output for each problem. Problem 18 Two new
Do all of this in python no C++ or C language provide both the source code and output for each problem.
Problem 18
Two new people are added to these height (in meters) and weight (in kilogram) lists. They are the numbers in red below.
height = [1.47, 1.5, 1.52, 1.55, 1.57, 1.6, 1.63, 1.65, 1.68, 1.7, 1.73, 1.75, 1.78, 1.8, 1.83, 1.81, 2.20]
weight = [52.21, 53.12, 54.48, 55.84, 57.2, 58.57, 59.93, 61.29, 63.11, 64.47, 66.28, 68.1, 69.92, 72.19, 74.46, 49.12, 85.65]
Calculate the bmi of the last person added
Calculate the bmi of the second to last person added
Hint: to get the last person's height and weight you can use range -1 trick
Hint: to get the second to last persons height and weight you can use range -2 trick
Hint: The formula for BMI is weight in kilograms divided by height in meters squared.
https://www.google.com/search?q=bmi+formula&rlz=1C1CHBF_enUS763US763&sxsrf=ALiCzsZfHc7ceF5I_IE2ABWqn0vuyfqQ2A:1671093503530&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjDgai1nPv7AhV4H0QIHcBQDEIQ_AUoAXoECAEQAw&biw=1325&bih=892&dpr=1
Problem 20
Give two sets
set1={1,2,3,4,5}
set2={4,5,6,7,8}
Run each of the four Python set operations (union, intersection, difference and symmetric difference) on these and print the result. Explain briefly in a few of your own words what each operation is doing.
Hint: look about half way down in this article and it shows you exactly how to do it
https://www.programiz.com/python-programming/set
Look at this page and also tell me in a few of your own words what modules are about
https://www.w3schools.com/python/python_modules.asp
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started