1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
rodikova [14]
3 years ago
9

Write code to create a list of integers from 0 through 52 and assign that list to the variable numbers. You should use a special

Python function – do not type out the whole list yourself.
Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
7 0

Answer:

The program written in Python is as follows:

numbers = []

for i in range(0,53):

     numbers.append(i)

print(numbers)

Explanation:

The first line declares an empty list using variable numbers

numbers = []

The next iteration auto generates the content of the list from 0 to 52

<em>for i in range(0,53):</em>

<em>      numbers.append(i)</em>

This line prints the generated list

print(numbers)

You might be interested in
Xml provides a standardized, non-customizable way to describe the content of a document.
Rainbow [258]
XML (eXtensible Markup Language) is a meta-language that defines a language (of your creation, within XML specs). The language that you create has to follow your specifications.
7 0
4 years ago
The ____ criteria filter requires the records displayed to start with the specified text string
lys-0071 [83]

The "Begins With" criteria filter is what your looking for

3 0
3 years ago
6.23 LAB: Convert to binary - functions Instructor note: This is a lab from a previous chapter that now requires the use of a fu
Kitty [74]

Answer:

The program in Python is as follows:

import math

def integer_to_reverse_binary(integer_value):

   remainder = ""

   while integer_value>=1:

       remainder+=str(integer_value % 2)

       integer_value=math.floor(integer_value/2)

   reverse_string(remainder)

def reverse_string(input_string):

   binaryOutput=""

   for i in range(len(input_string)-1,-1,-1):

       binaryOutput = binaryOutput + input_string[i]

   print(binaryOutput)

integer_value = int(input("Enter a Number : "))

integer_to_reverse_binary(integer_value)

Explanation:

This imports the math module

import math

This defines the integer_to_reverse_binary function

def integer_to_reverse_binary(integer_value):

This initializes the remainder to an empty string

   remainder = ""

This loop is repeated while the integer input is greater than or equal to 1

   while integer_value>=1:

This calculates the remainder after the integer value is divided by 2

       remainder+=str(integer_value % 2)

This gets the floor division of the integer input by 2

       integer_value=math.floor(integer_value/2)

This passes the remainder to the reverse_string function

   reverse_string(remainder)

The reverse_string function begins here

def reverse_string(input_string):

This initializes the binaryOutput to an empty string

   binaryOutput=""

This iterates through the input string i.e. the string of the remainders

   for i in range(len(input_string)-1,-1,-1):

This reverses the input string

       binaryOutput = binaryOutput + input_string[i]

This prints the binary output

   print(binaryOutput)

<u>The main begins here</u>

This gets input for integer_value

integer_value = int(input("Enter a Number : "))

This passes the integer value to the integer_to_reverse_binary function

integer_to_reverse_binary(integer_value)

3 0
3 years ago
How many searches should you complete when looking up information using online references?<br>​
antoniya [11.8K]
As many as it takes of course ;)
3 0
3 years ago
Which of the following cannot be copyrighted? a. books b. inventions c. videos d. music
natita [175]
Well books, videos and music can all be copyrighted (I believe) so the logical answer would be b. inventions. Hope this helps.
7 0
3 years ago
Other questions:
  • While driving you encounter an emergency vehicle stopped ahead. Discuss how the move over law applies to this situation and your
    13·1 answer
  • 1. What is the difference between a learner’s license and an operator’s license?
    10·1 answer
  • Suppose a developer gets class XYZ files and documentation from a subcontractor. This class does not implement the Comparable in
    9·1 answer
  • Name the sections of an instruction.
    15·1 answer
  • 6.5 Code Practice: Question 1
    13·2 answers
  • A browser allows you to set preferences for using the browser. These preferences include all of the following except
    7·1 answer
  • 9. Select the correct answer.
    6·1 answer
  • The idea that an object can exist separate from the executing program that creates it is called
    13·1 answer
  • Following Aristotle,man by nature is a political animal,justify the above claim in the light of the Russian invasion of Ukraine
    13·1 answer
  • Please solve this in JAVA<br><br> Please see the attachment
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!