Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with these using Python. 1. Create a program that reads three integers from the user and displays them in sorted order (from

image text in transcribed

Please help me with these using Python.

1. Create a program that reads three integers from the user and displays them in sorted order (from smallest to largest). Use the min and max functions to find the smallest and largest values. The middle value can be found by computing the sum of all three values, and then subtracting the minimum value and the maximum value. 2. The Chinese zodiac assigns animals to years in a 12 year cycle. One 12 year cycle is shown in the table below. The pattern repeats from there, with 2012 being another year of the dragon, and 1999 being another year of the hare. Year 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 Animal Dragon Snake Horse Sheep Monkey Rooster Dog Pig Rat Tiger Hare Write a program that reads a year from the user and displays the animal associated with that year. Your program should work correctly for any year greater than or equal to zero, not just the ones listed in the table. 3. Create an array of 9 evenly spaced numbers going from 0 to 29 (inclusive) and give it the variable name r. Find the square of each element of the array (as simply as possible). Find twice the value of each element of the array in two different ways: (i) using addition and (ii) using multiplication. Print out the array r and each output requested above

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions