Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a list with 5 items having 3 distinct data types: -output the second element of the list -output the last element of the list

  1. Create a list with 5 items having 3 distinct data types:
  2. -output the second element of the list
  3. -output the last element of the list using
  4. -negative index
  5. -positive index
  6. -len method
  7.  
  8. Task 2
  9. -Create a list with 3 items
  10. -add an item to the end of the list
  11. -remove the first item of the list
  12. -determine if an item exists in the list
  13. -if it does, display its index
  14. -if it does not, give user message
  15.  
  16. Task 3
  17. -Create a list of doubles (the data type double, minimum 3 values)
  18. -output the minimum value
  19. -output the maximum value
  20.  
  21. Task 4
  22. -Create an empty list
  23. -Ask the user for any input 5 times
  24. -Only add the input to the list if it does NOT already exist
  25.  
  26. Task 5
  27. -Ask the user for input 3 times
  28. -Convert the inputs into a tuple
  29. -Output the tuple
  30.  
  31. Task 6
     
    Ask the user for 3 inputs
        starting number
        ending number
        increment number
     
    using for loop
        output each number from 0 to starting number
        output each number from 1 to starting number
        output each number from starting number to ending number
        output each number from starting number to ending number increasing by incremental number
     
     
    Task 7
     
    Using while loop, complete the four FOR loops above
  32. Task 8
     
    Continually ask the user for a number until they have inputted a value between the range of 50-75
    Escape the loop and display a congrats message
     
     
    Task 9
     
    Count up from 1-20 by ones
    Skip the numbers 6 and 13
     
     
    Task 10
     
    Count down from 60 to 12 by 3s
    Skip the odd numbers
     

Step by Step Solution

There are 3 Steps involved in it

Step: 1

As the programming language is not mentioned here we are using PYTHON The ability to manipulate lists is a foundational skill in Python programming Lists are versatile data structures that can hold a ... 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

Applied Linear Algebra

Authors: Peter J. Olver, Chehrzad Shakiban

2nd Edition

978-3319910406, 331991040X

More Books

Students also viewed these Programming questions

Question

6. Which types of memory are least impaired in people with amnesia?

Answered: 1 week ago