This is your code. >>> A = ['dog''red'] >>> B = [' cat', 'blue']>>>C = ['fish', 'green'] You can implement an array of this data by using by using

Answers

Answer 1

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given Python code is:

>>> A = ['dog''red']

>>> B = [' cat', 'blue']

>>>C = ['fish', 'green']

We can implement an array of this data by using the dictionary in Python.

Dictionary in python:

A dictionary in python stores (key-value) pairs. For example, we can implement the -given arrays A, B, and C in the dictionary as given below:

d={'dog : red', 'cat : blue', 'fish : green'}

print(d['dog']) # Get an entry from a dictionary; prints "red"

print('cat' in d)    # Check if a dictionary has a given key; prints "True"

d['fish'] = 'black'    # Set an entry in a dictionary

print(d['fish'])      # Prints "black"

# print(d['elephant'])  # KeyError: 'elephant' not a key of d

print(d.get('elephant', 'N/A'))  # Get an element with a default; prints "N/A"

print(d.get('fish', 'N/A'))   # Get an element with a default; prints "black"

del d['dog']        # Remove an element from a dictionary

print(d.get('dog', 'N/A')) # "dog" is no longer a key; prints "N/A"

Answer 2

Answer: by using lists but not by using the array module.

Explanation: Correct on Edg 2020.


Related Questions

Compare briefly the general structure of the complete language processor of Java and the language processor of C . (b) Explain the major differences.

Answers

Answer:

The difference to this question can be defined as follows:

Explanation:

Java language processor:

In java, it uses both compiler and interpreter.It uses high-level data is translated by java computer to byte-code, and by this, it transfers to an element, through either java interpreter or the Just-in-time, into electronic format Just-in-time compiler optimizations are generally preferred to the interpretation so because the process is slowed down. Its state of development of java bytecode is moderate (this byte code can run on any machine, on any operating system), therefore JAVA is an independent platform language.

C++ language processor:

In C++, it uses the only compiler. The software is preserved with the .cpp extension. so, that it can be converted to allelopathy of the c++ COMPILER, high - level language. The creation of the byte code is no intermediary, and it is not an independent platform.

As a sysadmin you will find yourself doing business with a variety of third party vendors which of these are likely to be rented or bought from a vendors

Answers

Answer:

Printing devices

Video, Audio devices

Communication machines

Explanation:

Printing devices - Sysadmin needs this type of devices for print important data and information.

Video, Audio devices - Sysadmin needs this type of devices for better communication and interaction.

Communication(fax) machines - Sysadmin needs this type of devices for written communication and interaction and deals.

The create_python_script function creates a new python script in the current working directory, adds the line of comments to it declared by the 'comments' variable, and returns the size of the new file. Fill in the gaps to create a script called "program.py". 1- def create_python_script(filename): 2 comments = "# Start of a new Python program" with open("filename", "w+") as file: file.write(comments) import os filesize - os.path.getsize(filename) print("The size of the file is:") return(filesize) Reset 3 4 5 6 7 Run 9 10 11 print(create python script("progran.py"))

Answers

Answer:

import os

def create_python_script(filename):

   comments = "# new python script file"

   with open(filename,"w+") as file:

       file.write(comments)

   filesize = os.path.getsize(filename)

   print(f"The size of the file is: {filesize}")

create_python_script("program.py")

Explanation:

The os module is a built-in python file that is used to interact with the operating system terminal. The with keyword is used to create and open a file with write privileges with no need to close the file.

The path.getsize() method is used to get the size of the newly created file which is printed in the console.

Which interpersonal skill is the most important for a telecom technician to develop?

active listening

teamwork

conflict resolution

social awareness

Answers

Answer:

active listening is interpersonal

Answer:

active listening

Explanation:

edg2021

telecom technicians go to homes and officies to listen to the consumers demands to fix their internet and other telecommmunication issues. They mostly work alone and simply need to be aware of the issue and what they are doing to fix it.

match the databse function to it's purpose

Answers

Answer:

Explanation:

Which database functions?

which data representation system is based on the digits 0-9 and is mostly easily interpreted In real wrold situations​

Answers

Answer:

Hexadecimal  data representation system is based on the digits 0-9 and is mostly easily interpreted In real word situations​ .

Explanation:

Hexadecimal manages sixteen different figures: most often the numbers 0–9 to describe values zero to nine, and (A–F) to describe values ten to fifteen. The modern hexadecimal system was first launched into the domain of computing by IBM in 1963. An older description, with 0-9 and u-z, was practiced in 1956 by the Bendix G-15 computer.

Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow each number with a space.
Sample output with input: 8
8 16 32 64
Here's what I havenum_insects = 8 # Must be >= 1print(num_insects, '', end='')while num_insects <= 100 : num_insects = num_insects * 2 print(num_insects,'', end="")This code prints the number 128 even thought the loop is set to end after 100? Why is that?

Answers

Answer:

The while loop is executed one more time when num_insects is 64. It gets doubled and 128 gets printed. Then the while loop is not executed anymore since 128 exceeds 100.

So the reason you see 128 is because the multiplication by 2 happens inside the loop before you print. You enter it with 64, but by the time you get to the print statement, it was already multiplied.

The solution is to switch the print and the multiply:

num_insects = 8 # Must be >= 1

while num_insects <= 100 :

   print(num_insects,'', end="")

   num_insects = num_insects * 2

This has one added advantage that the very first print statement outside the loop can be removed.

What is the last usable host IP address on the 192.168.32.9/30 network?

Answers

Answer:

192.168.32.10

Explanation:

HOPE THIS HELPS:)

Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop. Sample output for the given program:

Answers

user_num = 20

while user_num>= 1:

   print(user_num,"divided by 2 =",user_num/2)

   user_num /= 2

I wrote my code in python 3.8. I hope this helps.

Answer:

user_num = int(input())

while user_num>= 1:

  print(user_num/2)

  user_num /= 2

Explanation:

Simplified it

I've got the answer, I just need someone to explain it, please!

Answers

the reason this answer is 80 seconds is because if you add y(30 sec) + z(50 sec) = 80 seconds which would be the two processors

I need help with coding in python!
class CommandLine:

def __init__(self):

self.root = Directory('', None)

self.current_path = self.root


def run(self):

command = input('>>> ')

while command.strip().lower() != 'exit':

split_command = command.split()

if len(split_command):

if split_command[0] == 'ls':

self.current_path.display()

if len(split_command) >= 2:

if split_command[0] == 'cd':

self.change_directory(split_command[1])

elif split_command[0] == 'makedir':

self.current_path.create_directory(split_command[1])

elif split_command[0] == 'fcreate':

self.current_path.create_file(split_command[1])

elif split_command[0] == 'fwrite':

self.current_path.file_write(split_command[1])

elif split_command[0] == 'fread':

self.current_path.file_read(split_command[1])

elif split_command[0] == 'fclose':

self.current_path.close_file(split_command[1])

elif split_command[0] == 'fopen':

self.current_path.open_file(split_command[1])


command = input('>>> ')


def change_directory(self, dir_name):

pass



class Directory:

def __init__(self, name, parent):

pass


def display(self):

pass


def create_file(self, file_name):

pass


def create_directory(self, dir_name):

pass


def file_write(self, file_name):

pass


def file_read(self, file_name):

pass


def close_file(self, file_name):

pass


def open_file(self, file_name):

pass


class File:

pass



if __name__ == '__main__':

cmd_line = CommandLine()

cmd_line.run()
You must keep track of your current directory, and then you must be able to execute the commands listed below.

(The commands are explicitly different from linux so that you don't accidentally execute them in the shell, except for ls and cd which are harmless.)

Command


ls
Lists contents of the directory
cd [dirname]
Change directory up or down one level.
makedir [dirname]
Make a directory
fcreate [filename]
Creates a file, sets it closed.
fwrite [filename]
Write to a file, only if it's open.
fread [filename]
Read a file, even if it's closed.
fclose [filename]
Close a file. Prevents write.
fopen [filename]
Open a file. Reset the contents

Answers

Answer:

B

Explanation:

Sam’s password is known to be formed of 3 decimal digits (0-9) in a given order. Karren and Larry are attempting to determine Sam’s password by testing all possible combinations. If they are only able to try 10 combinations every day, how many days would it take to try all the possible combinations? 1000 100 3 73

Answers

Answer:

100

Explanation:

Answer:

The answer is 100, hope this helps!

Explanation:

Divide a network 10.10.0.0 with subnet mask 255.255.0.0 into 62 subnets.

10.10.0.0
0000 1010. 0000 1010 . 0000 0000 . 0000 0000

255.255.0.0
1111 1111. 1111 1111 . 0000 0000 . 0000 0000

Required:
a. How many bits do we need to borrow from the host portion?
b. List the lowest and the highest IP address of the first usable subnet.
c. How many usable hosts are there in total before and after subnetting?

Answers

Answer:

A. 6 bits

B. lowest IP address is  10.10.0.1  and the highest IP address is  10.10.3.254

C. total number of usable hosts before subnetting = 65534

total number of usable hosts after subnetting = 65408

Explanation:

The IP address 10.10.0.0 with the subnet mask 255.255.0.0 is a class B address with 16 bits of the network address portion and 16 bits of the host portion.

To subnet the address to use 62 subnets (and to reduce the host IP address wasted) 6 bits are borrowed from the host portion of the address to give 2^6 = 64 subnets with two usable host addresses.

The first network address is 10.10.0.0 and the first usable host address of the subnet is 10.10.0.1 making it the lowest address, while the broadcast address is 10.10.3.255 and the address before it becomes the higher address in the network which is 10.10.3.254

The number of usable host of the network before subnetting is 2^16 -2 = 65534, while after subnetting is (2^(16-6) - 2) x 64 = 65408.

Let G = (V, E) be an undirected graph. Design algorithms for the following (in each
case discuss the complexity of your algorithm):
(a) Assume G contains only one cycle. Direct the edges s.t. for each u, indegree(u) [tex]\leq[/tex] 1.
(b) Determine whether it is possible to direct the edges of G s.t. for each u, indegree(u) [tex]\geq[/tex] 1.
If it is possible, your algorithm should provide a way to do so.
(c) Let S be a subset of edges s.t. every cycle of G has at least one edge in S. Find a
minimum size subset S.

Answers

Answer:

i think its b if not sorry

Explanation:

what are the different alignment options available in Microsoft​

Answers

Answer:

Step 1 − Click anywhere on the paragraph you want to align and click the Align Text Left button available on the Home tab or simply press the Ctrl + L keys.

Left Alignment

Center Aligned Text

A paragraph's text will be said center aligned if it is in the center of the left and right margins. Here is a simple procedure to make a paragraph text center aligned.

Step 1 − Click anywhere on the paragraph you want to align and click the Center button available on the Home tab or simply press the Ctrl + E keys.

Center Alignment

Right-Aligned Text

A paragraph's text is right-aligned when it is aligned evenly along the right margin. Here is a simple procedure to make a paragraph text right-aligned.

Step 1 − Click anywhere on the paragraph you want to align and click the Align Text Right button available on the Home tab or simply press the Ctrl + R keys.

Right Alignment

Justified Text

A paragraph's text is justified when it is aligned evenly along both the left and the right margins. Following is a simple procedure to make a paragraph text justified.

Step 1 − Click anywhere on the paragraph you want to align and click the Justify button available on the Home tab or simply press the Ctrl + J keys.

Justify Alignment

When you click the Justify button, it displays four options, justify, justify low, justify high and justify medium. You need to select only the justify option. The difference between these options is that low justify creates little space between two words, medium creates a more space than low justify and high creates maximum space between two words to justify the text.

Answer:

There are four main alignments: left, right, center, and justified. i think i answered this correct but easier to understand

What are the similarities and differences between the editor-in-chief, managing editor, assignment editor, and copyeditor? Your response should be at least 150 words.

Answers

Answer:

Editor. An editor is the individual in charge of a single publication. It is their responsibility to make sure that the publication performs to the best of its ability and in the context of competition. A managing editor performs a similar role, but with greater responsibility for the business of the publication.

Explanation:

I really need help with this question I will give you five stars

Answers

Answer:

A

Explanation:

do you agree or disagree with the assertion that edutech transforms teachung and learning ​

Answers

Answer:I agree!

Explanation:

Agree

HURRY HELP
A program contains an if statement followed by an else statement. When the condition in an if statement is met, what happens to the code that follows the else statement ?
it is a name error
it is a syntax error
it is ignored
it is executed

Answers

Answer:

Explanation:

syntax error - with this error the code cannot be executed, its a crucial error within the code

name error - misspell an identifier name, will stop the code from running

ignore error - could be something like grammar ignored, wont stop the code running

executed - it will crash the whole code stopping it from running if it involved any of the errors above

Answer:

it is ingnored because the if statemeant has been met

Explanation:

Edhesive 4.3 code practice question 1

Answers

Answer:

hugs = int(input("How old are you?: "))

hug = 0

while(hug < hugs):

   print("**HUG**")

   hug = hug + 1

Explanation: Enjoy

Answer:

age = int(input("Enter your age: "))

c = age

o = 0

while (o < age):

   print("**HUG**")

   o = o + 1

print("**virtual hug**")

Explanation:

Given an array of users, write a function, namesAndRoles that returns all of user's names and roles in a string with each value labeled.For example: const users = [ { name: 'Homer', role: 'Clerk', dob: '12/02/1988', admin: false },{ name: 'Lisa', role: 'Staff', dob: '01/30/1965', admin: false },{ name: 'Marge', role: 'Associate', dob: '09/10/1980', admin: true } ] namesAndRoles(users) // Name: Homer // Role: Clerk // Name: Lisa // Role: Staff // Name: Marge // Role: Associatefunction namesAndRoles(users) { return users } namesAndRoles(users)

Answers

Answer:

def namesAndRoles(users):

   for user in users:

       return f"{user[name]}, {user[role]}"

Explanation:

The python program gets the list of dictionaries of the users in a company and returns the user names and their roles. The code is defined as a function and is executed when the function is called.

In ANSI standard C(1989) code - this is what we are teaching- declarations can occur in a for statementas in
for(int i;i<10; i++0.
True
O
False​

Answers

Answer:

true is the answer to this

Which of the following is not an example of Detailed Demographics?
Car ownership status
Homeownership status
Marital status
Parenting stages?

Answers

Answer:

Car ownership status.

Explanation:

While the rest have detailed demographics, demographics of car buyers are, by brand. A detailed demographic of a car ownership 'status' sounds ridiculous.

1, and
Which line of code could be used for a constructor?
e
O definit (firstName, lastName, id Num):
O definit(self, firstName,lastName,idNum):
O def
_init_(firstName, lastName idNum):
O def
_init__(self, firstName,lastName idNum)

Answers

Answer:

i think (first name last name id Num)

On a flowchart, what does an oval represent?

a
output

b
process

c
start or stop

d
input

Answers

On a flowchart, start or stop does an oval represent.

The ________ function deletes all elements of the list.

Answers

Answer:

clear

clear() :- This function is used to erase all the elements of list.

Explanation:

The clear function deletes all elements of the list. The clear method removes all the elements from a list.

What is a function?

Simply said, a function is a “chunk” of code that you may reuse repeatedly rather than having to write it out several times. Programmers can divide an issue into smaller, more manageable parts, each of which can carry out a specific task, using functions.

A list's whole contents are cleared via the clear() method. It returns an empty list after removing everything from the list. No parameters are required, and if the list is empty, no exception is raised. The clear function is present in all languages of computers but has different codes and functions.

Therefore, the list's whole contents are removed by the clear function. All of the elements in a list are removed by the clear method.

To learn more about the function, refer to the link:

https://brainly.com/question/17001323

#SPJ2

Ship, CruiseShip, and CargoShip ClassesDesign a Ship class that has the following members:a. a member variable for the name of the ship (a string)b. a member variable for the year that the ship was built (a string)c. A constructor and appropriate accessors and mutatorsd. A virtual print function that displays the ship's name and the year it was built.

Answers

Answer:

def shipvari(ship);

Cruiseship="" #defining a string

YearBuilt= ""

for i in range(ship);

if Cruiseship="";

print(CruiseShip)

Give the rest a try!

Write a function contains_at() that accepts two sequences (e.g., lists, strings, etc), s and q, and an integer p

Answers

Answer:

Following are the method to this question:

def contains_at (s, q, p):#defining a method contains_at that accepts a list string and an integer.  

Explanation:

In the above-given question, some of the data missing, that's why we define this question as follows:

program for the above the given method:

def contains_at (s, q, p):#defining a method contains_at

   return s,q,p #use return keyword to return parameter value

s="data base"#defining string variable

q=[1,2,3,4,5]#defining a list  

p=3#defining integer variable  

print(contains_at(s,q,p))#use print method to call contains_at method

Output:

('data base', [1, 2, 3, 4, 5], 3)

In the above program, a method contains_at  is declared, which accepts a list, string, and an integer value in its parameters, and use the return keyword to return the above parameter value.

In the next step, a parameter variable is declared, which accepts a value, and use a print method to call the method.

Is there anyone who is very good with Microsoft access? ​

Answers

Answer:

na i can boot people offline

Explanation:

Write a program that reads a string from the user containing a date in the form mm/dd/yyyy. If the user entered 12/10/2019, then it should print the date in the form December 10, 2019. solution in python.

Answers

Answer:

months = ["January","February","March","April","May","June","July","August","September","October","November","December"]

date = input("mm/dd/yyyy: ")

splitdate = date.split("/")

print(months[int(splitdate[0])-1]+" "+splitdate[1]+", "+splitdate[2]+".")

Explanation:

This line initializes a list of all 12 months

months = ["January","February","March","April","May","June","July","August","September","October","November","December"]

This prompts the user for date

date = input("mm/dd/yyyy: ")

This splits the date into three parts; mm with index 0, dd with index 1 and yy with index 2

splitdate = date.split("/")

The following prints the required output

print(months[int(splitdate[0])-1]+" "+splitdate[1]+", "+splitdate[2]+".")

Analyzing the print statment

splitdate[1] represents the day of the date

splitdate[2] represente the month of the date

However, in months[int(splitdate[0])-1]

First: splitdate[0] represents the month of the year as a string in numeric form e.g. "12", "01"

It is first converted to an integer as: int(splitdate[0])

Then the corresponding month is derived from the month list

Other Questions
(-6y + 8y4 5)(y2 11y) please help will mark brainliest What do you notice about the products of cellular respiration compared to the reactants of photosynthesis? The earl gasped nervously and they reached the tall doors of the banquet hall. What is/are the adjectives in the sentence. Check all that apply.nervouslytallbanquethall A change in location with respect to a reference point is ___ PLEASE HELP!!! 2 integers with a sum of 0 and product of -16 Find the equation of the line that is parallel to the given line and passes through the given points Y=0.1 X -2;(-4,8)The equation is y=Please help its very urgent Please HELP ASSSP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! plz give answer and explanation i will give 24 points There are 30 marbles in a bag. 24 of them are blue. What percentage of the marbles are blue? what is corona virus? what does it do? please tell The narrator asserts that we must be sure to understand that which character was dead when the story opens? Group of answer choices Tiny Tim Bob Cratchitt Ebenezer Scrooge Jacob Marley Calculate the magnitude of the gravitational force between Goku with a mass of 62 kg and King Kais planet with a mass of 1.458x1015 kg if the distance between their centers of mass is 31 m. Marketing is the process of combining the conception, pricing, promotion, and distribution of goods or services to create exchanges that satisfy individual and organizational objectives. Thumbs mostly up. Only a very few teens say that using social media has a negative effect on how they feel about themselves; many more say it has a positive effect. Twenty-five percent say social media makes them feel less lonely (compared to 3 percent who say more); eighteen percent say it makes them feel better about themselves (compared to 4 percent who say worse); and 16 percent say it makes them feel less depressed (compared to 3 percent who say more). Managing devices is hit or miss. Many turn off, silence, or put away their phones at key times such as when going to sleep, having meals with people, visiting family, or doing homework. But many others do not: A significant number of teens say they "hardly ever" or "never" silence or put away their devices. Less talking, more texting. In 2012, about half of all teens still said their favorite way to communicate with friends was in person; today less than a third say so. But more than half of all teens say that social media takes them away from personal relationships and distracts them from paying attention to the people they're with. Vulnerable teens need extra support. Social media is significantly more important in the lives of vulnerable teens (those who rate themselves low on a social-emotional wellbeing scale). This group is more likely to say they've had a variety of negative responses to social media (such as feeling bad about themselves when nobody comments on or likes their posts). But they're also more likely to say that social media has a positive rather than a negative effect on them. The statistics provide support for the author's claim that - Question 2 options: social media may affect personal relationships even if you don't think so. teens do not spend much time face to face with friends. teens think that social media is the best thing that ever happened to them. teens cannot spend much time face to face with friends. A satellite was in two separate crashes. In both crashes, the satellite had the same mass. Engineers want to know about the speed and direction of the satellite after the crashes. Why would the crash affect the motion of the satellite, and which crash caused a greater change in motion for the satellite? Read the excerpt from Narrative of the Life of Frederick Douglass.We were all ranked together at the valuation. Men and women, old and young, married and single, were ranked with horses, sheep, and swine. There were horses and men, cattle and women, pigs and children, all holding the same rank in the scale of being, and were all subjected to the same narrow examination. Silvery-headed age and sprightly youth, maids and matrons, had to undergo the same indelicate inspection.Which best states the cause/effect relationship expressed in the excerpt?Cause: The enslaved persons are treated inhumanely at the examination. Effect: Douglass makes an attempt to run away.Cause: All the enslaved persons are ranked together for inspection. Effect: Douglass is separated from his family.Cause: Douglass witnesses the inhumane treatment of enslaved persons. Effect: He becomes more aware of the brutality of slavery.Cause: Douglass is examined and determined to be valuable. Effect: He is sent back home to Baltimore. Diamond has a density of 3.26 g/cm^3. What is the mass of a diamond that has a volume of 25 cm^3? Some Native American tribes organized themselves by havingall male adult members of the tribe vote for any proposedlaws or changes. What type of government is described? Please help :((( will mark brainliest ! Steam Workshop Downloader