Question

1. Write a statement that assigns an empty list to the variable named empty. 2. Write...

1. Write a statement that assigns an empty list to the variable named empty.

2. Write a statement which assigns all the odd integer values between 0 and 10 (in order) to the variable named odds.

3. Write a statement which assigns the list of three-letter abbreviations of the months of the year to the variable months. That would be:

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec

Capitalize correctly and have no punctuation.

4. Create a list named threes which has the values (in this order):

  • three
  • 3
  • 3.0

5. Create a list named threes which has the values (in this order):

  • three
  • 3
  • 3.0

6. Create a list named coins with the values 0.01, 0.05, 0.1, 0.25, 0.5, and 1.0.

Homework Answers

Answer #1

#Answer1:
empty=[]
#Answer2
odds=[]
for i in range(0,11):
   if i % 2==0:
       odds.append(i)
print(odds)
#Answer3:
months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
#Answer4:
threes=["three",3,3.0]
#Answer5:
threes=["three",3,3.0]
#Answer6:
coins=[0.01, 0.05, 0.1, 0.25, 0.5, and 1.0]

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a statement which assigns all the odd integer values between 0 and 10 (in order)...
Write a statement which assigns all the odd integer values between 0 and 10 (in order) to the variable named odds. Python Language
In C++ Employee Class Write a class named Employee (see definition below), create an array of...
In C++ Employee Class Write a class named Employee (see definition below), create an array of Employee objects, and process the array using three functions. In main create an array of 100 Employee objects using the default constructor. The program will repeatedly execute four menu items selected by the user, in main: 1) in a function, store in the array of Employee objects the user-entered data shown below (but program to allow an unknown number of objects to be stored,...
TODO 1: Constructor. It assigns the songList member variable to a new instance of an ArrayList...
TODO 1: Constructor. It assigns the songList member variable to a new instance of an ArrayList that stores Song objects.. TODO 2: Implement the isEmpty method. Takes no parameters. Returns true if there are no songs on the list, false otherwise. TODO 3: Implement the addSong method. This method takes a Song object as a parameter and does not return a value. It adds the song to the songList. TODO 4: Implement the getSongListAsString method. This method takes no parameters....
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two...
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two columns, departments and their SKU counts. use cape_codd; select department, count(*) from sku_data group by department ; 2. List buyers who is responsible for at least two SKUs, in three columns, department, buyer, sku count. Sort buyers by their department names in ascending order. select department, buyer, count(sku) from sku_data group by buyer ; 3. Write a SQL statement which returns all the orders....
SQL Write the queries necessary to obtain the required information 1) Use sub query and “in”...
SQL Write the queries necessary to obtain the required information 1) Use sub query and “in” keyword to print the salesreps (ids) who have taken order for the companies ‘Zetacorp’ or ‘JCP Inc.’ . Duplicate rows are not allowed 2) Use sub query to find the id and the name of every sales rep that represents at least one customer with a credit limit of greater than $5000. 3) Use sub query and keyword “exists” to list the id and...
How to use C++ figure this question? Collection and Sorted Collection An array is great for...
How to use C++ figure this question? Collection and Sorted Collection An array is great for storing a list of values. However, one challenge when working with arrays is they have a fixed size. If you declare an array of size 10 and later need to actually store 11 elements you have to create a new array and copy everything over. C++ (and other langauges) create classes that handle this and other operations behind the scenes. In this assignment, we...
Great Adventures Problem AP3-1 Skip to question [The following information applies to the questions displayed below.]...
Great Adventures Problem AP3-1 Skip to question [The following information applies to the questions displayed below.] Tony and Suzie graduate from college in May 2021 and begin developing their new business. They begin by offering clinics for basic outdoor activities such as mountain biking or kayaking. Upon developing a customer base, they’ll hold their first adventure races. These races will involve four-person teams that race from one checkpoint to the next using a combination of kayaking, mountain biking, orienteering, and...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
Assignment Statement Use the skeleton file starter code (below) to create the following classes using inheritance:...
Assignment Statement Use the skeleton file starter code (below) to create the following classes using inheritance: ⦁   A base class called Pet ⦁   A mix-in class called Jumper ⦁   A Dog class and a Cat class that each inherit from Pet and jumper ⦁   Two classes that inherit from Dog: BigDog and SmallDog ⦁   One classes that inherit from Cat: HouseCat The general skeleton of the Pet, Dog, and BigDog classes will be given to you (see below, "Skeleton", but...
1. The failure of the new supply chain system affected Nike adversely. What were the reasons...
1. The failure of the new supply chain system affected Nike adversely. What were the reasons for the failure and how did the breakdown harm Nike? 2. What are the important elements to be kept in mind while implementing a new system in an organization? What is the importance of a good working relationship between partners and the sharing of responsibility in implementing critical projects? What mistakes did Nike and i2 make? 3. comment on the lessons learned and the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT