Question

Should be done in python. Create this list [1, 0.5, 0.33, ... , 0.01]

Should be done in python.

Create this list [1, 0.5, 0.33, ... , 0.01]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer

lst = []

for i in range(1, 101):
    lst.append(1 / i)

print(lst)
Add a comment
Know the answer?
Add Answer to:
Should be done in python. Create this list [1, 0.5, 0.33, ... , 0.01]
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Should be done in Python, please help Create a class for a 2x2 matrix. Give the...

    Should be done in Python, please help Create a class for a 2x2 matrix. Give the init function and create functions to return each entry of the 2x2 matrix.

  • Python help: Create two lists of 5 elements. The first list should be a series of...

    Python help: Create two lists of 5 elements. The first list should be a series of questions whose answer is either "T" or "F" (true or false). The second list should be the correct answers to those questions ("T" or "F"). Write a program that asks the user each question in the question list and compares their answer to the answer in the answer list. Print out whether or not they got the question correct and print out their final...

  • ** Language Used : Python ** PART 2 : Create a list of unique words This...

    ** Language Used : Python ** PART 2 : Create a list of unique words This part of the project involves creating a function that will manage a List of unique strings. The function is passed a string and a list as arguments. It passes a list back. The function to add a word to a List if word does not exist in the List. If the word does exist in the List, the function does nothing. Create a test...

  • How to do this code? HW13.11. Create an HTML list from a Python list The function...

    How to do this code? HW13.11. Create an HTML list from a Python list The function below takes one parameter: a list, that contains only strings. Complete the function to create a unordered HTML list, as a string, and returns it. An empty list should return an empty HTML list with no list items. Do not add any extraneous whitespace to the HTML. For example, if given the list ["one", "two"], the function should return "<ul><li>one</li><li>two</li> </ul>". student.py IT TI...

  • In Python: # Q1: create a list that has the following items. # {1, 2 ,...

    In Python: # Q1: create a list that has the following items. # {1, 2 , 3 , 4 , 5} # you need to start with an empty list. and then add the above components # one by one. MyList = [ #create an empty list, 1 point MyList.-----(1) #add 1 to the list, 1 point MyList.-----(2) MyList.-----(3) MyList.-----(4) MyList.-----(5) # now find the length of the list. print(---(MyList)) # 1 point # select the starting and ending point...

  • Exercise 1 - Create a List to Sum Values Write a python script that sums the...

    Exercise 1 - Create a List to Sum Values Write a python script that sums the values in a list called add_list that contains the following values: (10, 2, -4, 8). Make sure you include a for loop when iterating through the list to sum the values. Take screenshots of the code and output. Exercise 2 – Create a Dictionary Write a python script that prints a dictionary where the key numbers are 1, 2, 3, 4, and 5 and...

  • Using Python Create a simple linked list by defining a struct (in C/C++) or a class...

    Using Python Create a simple linked list by defining a struct (in C/C++) or a class (in Python3). For example, in C/C++: struct singly_linked_list { int data; singly_linked_list *next; }; (Make sure you understand the concept of pointers - or lack thereof - in Python.) Write a function to determine if there is a cycle in the singly linked list. Return 1 if there is a cycle in the list, 0 if no cycle. This is a very common interview...

  • In python,Using list comprehension create an expression that sums up all the factors of an positive...

    In python,Using list comprehension create an expression that sums up all the factors of an positive integer number. For example, if the number is 6, then the output should be 12 (i.e., 1+2+3+6 =12). Your answer should be only one line of code.

  • In python: Create a list called numten that contains ten numbers go through the list and...

    In python: Create a list called numten that contains ten numbers go through the list and list the even and odd numbers

  • should be done in python please help 9) A file named floats.txt contains a bunch of...

    should be done in python please help 9) A file named floats.txt contains a bunch of numbers. Create a file named stats.txt that contains: the minimum number, the maximum number, the sum of the numbers, the average number, and the standard deviation of the numbers, each on a separate line.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT