Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Take two lists as input from user. The lists are named as cat_1 and cat_2 . The lists contain the daily weights of two cats

  1. Take two lists as input from user. The lists are named as cat_1 and cat_2. The lists contain the daily weights of two cats over a period of ten days.

Write statements to do the following: using python

  1. If the weight of cat_1 is greater than that of cat_2 on day 1, print " cat_1 weighed more than cat_2 on Day 1."; otherwise, print " cat_1 weighed less than cat_2 on Day 1."
  2. If cat_1 weighed more than cat_2 on day 1 and if cat_1 weighs more than cat_2 on the last day, print " cat_1 remained heavier than cat_2."; otherwise, print " cat_2 became heavier than cat_1."
  3. If your solution to the previous question used nested if statements, then do it without nesting, or vice versa.

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

More Books

Students also viewed these Databases questions

Question

How can you defend against SQL injection attacks?

Answered: 1 week ago

Question

6. What questions would you suggest should be included?

Answered: 1 week ago