Please help ASAP

14. What is the following code snippet doing?
cities_array = ["Boston":"Winthrop", "Belmont". "Braintree", "Cambridge"]

O increasing the scope of the variable cities_Array

O validating city inputs

O creating an index s city names for an array

OThis code would return a syntax error.

Answers

Answer 1
( If this is in python) then it would return a syntax error because you have used a dot and a colon instead of a comma

Related Questions

The operation of an enable input on a multiplexer chip is.

Answers

Answer:

is used to activate the chip.

Explanation:

when enable is high the chip works (ACTIVE), when enable is low the chip does not work (MEMORY).

You can enter common data in multiple worksheets by __________.
a) Grouping Worksheets
b) Data Validation
c) PivotTable
d) Consolidating Data​

Answers

Answer:

A.) Grouping Worksheet.

Explanation:

Hope this helps!

different types of programming languages​

Answers

the main types are machine language, assembly language and high level language

Answer:

At the time of writing, some of the top programming languages include: 

C

Java 

Python

C++

C# 

Visual Basic 

JavaScript

PHP

SQL

Assembly language

R

Groovy 

Building a String Library

Sometimes when programming you need to introduce a new data type and develop a library of functions for manipulating instances of that data type. Often this is done as methods on a new class but not always.

In this assignment, you'll be defining a collection of functions on strings, most of which already exist as methods on the str class. However, you should pretend that they don't already exist and define them as functions. Of course, you can't just use the existing methods. This will give you a bunch of practice on manipulating strings and also on defining functions.

In this assignment, you'll be defining a collection of functions on strings. You should define each of these as a new function with a function header as below. The description of each is in the comment supplied. Recall that strings are immutable, so you will have to return a new copy of the string for those that call for you to return a string. If you are returning the same string as the input, just return it; there is no need to make a new copy, and it wouldn't anyway.

The only string functions/methods to use:

ord, chr
indexing and slicing
append (i.e., ``+'')
len, in, not in
equality comparison (== or !=))
Looping over strings (while or for loops) and selection (if statements) are allowed. BUT You cannot convert the strings to other types such as lists.

Define each of the following functions, with semantics as indicated by the comment. In each of the following ch is a single character, str, str1, str2 are strings, and i is a non-negative integer. You do not have to validate the inputs, except as indicated; you can assume these types.

At least one question asks you to return two values. That really means returning a tuple (pair) of values. You do that as follows:

return value1, value2
This actually returns the pair (value1, value2). The caller can then assign the members of the pair to two variables:

x, y = pairReturningFunction() # assumes function returns a pair
z, w = (value1, value2) # assigning a tuple to 2 variables
If you like, you can use earlier functions in later ones, or define helper functions, though it shouldn't really be necessary. Note that some of these are trivial to write, while others are a bit harder. I have done the first one for you.

def myAppend( str, ch ):
# Return a new string that is like str but with
# character ch added at the end
return str + ch

def myCount( str, ch ):
# Return the number of times character ch appears
# in str.

def myExtend( str1, str2 ):
# Return a new string that contains the elements of
# str1 followed by the elements of str2, in the same
# order they appear in str2.

def myMin( str ):
# Return the character in str with the lowest ASCII code.
# If str is empty, print "Empty string: no min value"
# and return None.

def myInsert( str, i, ch ):
# Return a new string like str except that ch has been
# inserted at the ith position. I.e., the string is now
# one character longer than before. Print "Invalid index" if
# i is greater than the length of str and return None.

def myPop( str, i ):
# Return two results:
# 1. a new string that is like str but with the ith
# element removed;
# 2. the value that was removed.
# Print "Invalid index" if i is greater than or
# equal to len(str), and return str unchanged and None

def myFind( str, ch ):
# Return the index of the first (leftmost) occurrence of
# ch in str, if any. Return -1 if ch does not occur in str.

def myRFind( str, ch ):
# Return the index of the last (rightmost) occurrence of
# ch in str, if any. Return -1 if ch does not occur in str.

def myRemove( str, ch ):
# Return a new string with the first occurrence of ch
# removed. If there is none, return str.

def myRemoveAll( str, ch ):
# Return a new string with all occurrences of ch.
# removed. If there are none, return str.

def myReverse( str ):
# Return a new string like str but with the characters
# in the reverse order.
Expected output:

>>> from MyStringFunctions import *
>>> s1 = "abcd"
>>> s2 = "efgh"
>>> myAppend( s1, "e" )
'abcde'
>>> myCount( s1, "e")
0
>>> myCount( s1, "a")
1
>>> myCount( "abcabc", "a")
2
>>> myExtend( s1, s2 )
'abcdefgh'
>>> myMin( "" )
Empty string: no min value # Note the None doesn't print
>>> myMin( "zqralm" )
'a'
>>> myMin( "Hello World!" )
' '
>>> myInsert( "abc", 0, "d")
'dabc'
>>> myInsert( "abc", 2, "d")
'abdc'
>>> myInsert( "abc", 4, "d")
Invalid index # Note the None doesn't print
>>> myPop( "abcd", 1 )
('acd', 'b')
>>> myPop( "abcd", 0 )
('bcd', 'a')
>>> myPop( "abcd", 5)
Invalid index
('abcd', None)
>>> myFind( "abcdabcd", "a")
0
>>> myFind( "abcdabcd", "c")
2
>>> myFind( "abcdabcd", "f")
-1
>>> myRFind("abcdabcd", "d")
7
>>> myRFind("abcdabcd", "e")
-1
>>> myRemove( "abcdabcd", "a")
'bcdabcd'
>>> myRemove( "abcdabcd", "x")
'abcdabcd'
>>> myRemove( "abcdabcd", "d")
'abcabcd'
>>> myRemoveAll("abcabcabca", "a")
'bcbcbc'
>>> myReverse( "abcd" )
'dcba'
>>> myReverse( "" )
''

Answers

Code:

def myAppend( str, ch ):
# Return a new string that is like str but with
# character ch added at the end
return str + ch

def myCount( str, ch ):
# Return the number of times character ch appears
# in str.

# initiaalizing count with 0
count = 0

# iterating over every characters present in str
for character in str:
# incrementing count by 1 if character == ch
if character == ch:
count += 1

# returning count
return count


def myExtend( str1, str2 ):
# Return a new string that contains the elements of
# str1 followed by the elements of str2, in the same
# order they appear in str2.

# concatenating both strings and returning its result
return str1 + str2

def myMin( str ):
# Return the character in str with the lowest ASCII code.

# If str is empty, print "Empty string: no min value"
# and return None.
if str == "":
print("Empty string: no min value")
return None

# storing first character from str in char
char = str[0]

# iterating over every characters present in str
for character in str:
# if current character is lower than char then
# assigning char with current character
if character < char:
char = character
# returning char
return char


def myInsert( str, i, ch ):
# Return a new string like str except that ch has been
# inserted at the ith position. I.e., the string is now
# one character longer than before.

# Print "Invalid index" if
# i is greater than the length of str and return None.

if i > len(str):
print("Invalid index")
return None

# str[:i] gives substring starting from 0 and upto ith position
# str[i:] gives substring starting from i and till last position
# returning the concatenated result of all three
return str[:i]+ch+str[i:]

def myPop( str, i ):
# Return two results:
# 1. a new string that is like str but with the ith
# element removed;
# 2. the value that was removed.
# Print "Invalid index" if i is greater than or
# equal to len(str), and return str unchanged and None
if i >= len(str):
print("Invalid index")
return str, None

# finding new string without ith character
new_str = str[:i] + str[i+1:]

# returning new_str and popped character
return new_str, str[i]

def myFind( str, ch ):
# Return the index of the first (leftmost) occurrence of
# ch in str, if any. Return -1 if ch does not occur in str.

# finding length of the string
length = len(str)

# iterating over every characters present in str
for i in range(length):
# returning position i at which character was found
if str[i]==ch:
return i
# returning -1 otherwise
return -1


def myRFind( str, ch ):
# Return the index of the last (rightmost) occurrence of
# ch in str, if any. Return -1 if ch does not occur in str.

# finding length of the string
length = len(str)

# iterating over every characters present in str from right side
for i in range(length-1, 0, -1):
# returning position i at which character was found
if str[i]==ch:
return i
# returning -1 otherwise
return -1

def myRemove( str, ch ):
# Return a new string with the first occurrence of ch
# removed. If there is none, return str.

# returning str if ch is not present in str
if ch not in str:
return str

# finding position of first occurence of ch in str
pos = 0

for char in str:
# stopping loop if both character matches
if char == ch:
break
# incrementing pos by 1
pos += 1

# returning strig excluding first occurence of ch
return str[:pos] + str[pos+1:]

def myRemoveAll( str, ch ):
# Return a new string with all occurrences of ch.
# removed. If there are none, return str.

# creating an empty string
string = ""

# iterating over each and every character of str
for char in str:
# if char is not matching with ch then adding it to string
if char!=ch:
string += char
# returning string
return string

def myReverse( str ):
# Return a new string like str but with the characters
# in the reverse order.

return str[::-1]

How can you create a messages to look like an IMessage?

Answers

Answer:

An article about the company in a city newspaper are consumers most like to trust.

Explanation:

What is the new programming language for developing iOS and Mac app

Answers

Answer:

Swift

Explanation:

I'm not sure about new, but IOS developers have been using Swift ever since the begining of time!

Question 3 You are working with the ToothGrowth dataset. You want to use the skim_without_charts() function to get a comprehensive view of the dataset. Write the code chunk that will give you this view.

Answers

There are different kinds of chunk options. The code chunk  that will give me this view is  skim_without_charts(ToothGrowth)

This code chunk can gives me a comprehensive view of the dataset. When you look into the parentheses of the skim_without_charts() function, you will see the name of the dataset that you intended looking into/viewing.

The code is known to return or give a short detail with the name of the dataset and the number of rows and columns therein.

It also makes one to see the column types and data types that are found/ contained in the dataset. The ToothGrowth dataset is known to have 60 rows.

Learn more about Code Chuck from

https://brainly.com/question/25525005

explain different users of computer in briefly?​

Answers

Answer:

The question is invalid; there are many types of computer user. Why on earth do you think there are five?

From the top of my head.

Casual- someone at home browsing the web, reading email.

IT Consultant. Advising people.

Software developer- writing software

Secretary - manages email for a company

Academic. Writing research papers.

Monitors. Monitor a computer system.

That’s six off the top of my head. There are probably a dozen more. So why do you think there are five?

Please answer these questions.

Answers

For question 15 the answer is option C. I don't know the answers to the other questions

Assume that students in a course are required to produce a written report on an ICT-related
the topic each semester. If you wanted to create a model to estimate how long it should take a student to
complete such an assignment, what measure of work content would you use? Some reports might be
more difficult to produce than others: what factors might affect the degree of difficulty? Provide a list
of factors and explain each briefly.

Answers

Based on the information given, the measures of work content that can be utilized will be:

The student's knowledge of the subject.   The work's difficulty. The student's research hours.

In order to create a model to estimate how long it should take a student to

complete such an assignment, the important measures include the knowledge of the student on the subject, research hours, etc. This may be evaluated on a scale of 0 to 10.

The factors that may influence the degree of difficulty include:

The student's access to materials for the assignment. The student's familiarity with the work. The amount of time required to fully grasp the subject.

Learn more about a model on:

https://brainly.com/question/17764105

A wireless ________ extender is a network device that enhances transmission of your wireless signal.

Answers

Explanation:

A wifi range extender,sometime called a range expander,is type of wireless repeater used to exten wifi range.

conclusion for project for computer​

Answers

OK this question is answer easy the computer important of future

If you are trying to create a game that involves a mystery, what colors would work best to support the mood?
dark colors
bright colors
neutral colors
greyscale colors

i gave up in life

Answers

Answer:

the answer is dark colors

Answer:

Dark colors

Explanation:

Dark colors are very ominous and support a mood of mystery

The definition of "nested statements" is _____.
a. elements of HTML that work within other elements of HTML
b. elements of specific text that work within elements of HTML
c. elements of specific code that work within elements of HTML
d. elements of HTML that work outside of elements of HTML

Answers

C??i think sorry if wrong ..

Can someone help me do this who ever does it first get 100 points :)

Answers

Answer:

Wired: Means a cable or a wire connected thats the opposite of wireless.

Wireless is bascially a device with no cable needed.

3G: GB

4G: GB

5G: GB

Explanation:

Wired: Means a cable or a wire connected thats the opposite of wireless.

Wireless is bascially a device with no cable needed.

3G: GB

4G: GB

5G: GB

I want know answer for best way to copy formula on MS Access

Answers

Answer:

copy and paste is alternate

What does this Python expression evaluate to?

100 != 100

True

False

“True”

“False”

Answers

Answer: False

Explanation:

Marci enjoyed the restaurant's meatloaf so much, she asked for the recipe. She wants to make 1/6 of the recipe. How much garlic powder does Marci need?

Answers

Answer:

she needs 1/6 of the garlic powder in the original recipe

Hope This Helps!!!

who invent cars and who invent bikes and who invent pc

Answers

Answer:

Cars were invented in 1886 by Karl Benz.The term bicycle was coined in France in the 1860s, but The first verifiable claim for a practically used bicycle belongs to German Baron Karl von Drais in 1817The first computer was by Charles Babbage, an English mechanical engineer and polymath he originated the concept of a programmable computer.

Which part of the computer is responsible for managing memory allocation for all applications


A. Word processor


B. Operating system


C. Web browser


D. Intergrated development environment


I think it’s B but I’m not sure so I want to see if I’m right before answering

Answers

Answer:

Option B

Explanation:

The operating system is the type of software that is responsible for managing the processor time and also the memory allocation in the system. The operating system mainldeals with the processor time by scheduling the processor work done in the system.

The OS mainly controls the system and then schedule the execution of various types of function by the central processing unit (CPU). It also controls the memory allocation in the system.

The part of the computer responsible for managing memory allocation for all applications is the operating system. The correct option is B.

What is an operating system?

The operating system is the kind of software in charge of controlling the system's memory allocation and CPU usage. By scheduling the system's processor work, the operating system primarily manages processor time.

The operating system (OS) primarily manages the system and schedules the central processor unit's performance of many types of functions. Additionally, it manages the system's memory allocation.

The CPU is the brain of the computer. It manages all the functions of the computer. It is a small rectangle chip-like structure present inside the box with other parts.

Thus, the part of the computer that is responsible for managing memory is the operating system. The correct option is B.

To learn more about the operating system, refer to the link:

https://brainly.com/question/6689423

#SPJ2

Distinguish between principles, guidelines and standards, using examples of each to illustrate​

Answers

Explanation:

principles is what governs a place

guidelines is what you read to guide you

standards is what build up in your self

Answer:

A principle is a basic truth to live by, such as “All human beings are equal in the eyes of God.” A guideline is a general rule or piece of advice such as “don't burn your bridges.” A standard is a rule to be upheld such as the Ten

types of digital divide ​

Answers

Explanation:

introduction. desktop computer,tablet computer,storage devices such as flash drivers, mobile phone...

Does technology always follow the science, yes or no and explain the reason your choice

Answers

Answer:

NO

Explanation:

because Technology does not always follow science but it may actually lead science in some instances. An example is weather forecasting.Mark me brainliest plz

Which cloud computing model allows users to create their own applications given a specific set of tools

Answers

I believe Windows or Apple computers. Sorry if I’m not helpful.

P3. Produce a plan to use social media in a business to meet its business requirements.

Answers

The plan to use social media in a business include:

It is important to audit the current social presence.  The company should document who their Ideal customer is. A mission statement should be created. One should identify the key success metrics. An engaging content should be created.  The company should also invest in a social media management tool.

It should be noted that using social media in a business is an effective way to meet its business requirements and achieve organizational goals.

Learn more about social media on:

https://brainly.com/question/1163631

What is the impact of Customer Centricity?

Answers

Customer-centric businesses generate greater profits, increased employee engagement, and more satisfied customers. Customer-centric governments and nonprofits create the resiliency, sustainability, and alignment needed to fulfill their mission.

use JAVA

Create a HighestGrade application that prompts the user for five grades between 0 and 100 points and stores

the grades in an ArrayList. HighestGrade then traverses the grades to determine the highest grade and then

displays the grade along with an appropriate message.

Output:

Enter a grade (between 0 and 100): 87

Enter a grade (between 0 and 100): 65

Enter a grade (between 0 and 100): 98

Enter a grade (between 0 and 100): 89

Enter a grade (between 0 and 100): 55

The highest grade is: 98

Answers

Answer:

import java.util.*;

public class HighestGrade

{

       public static void main(String args[])

       {

                Scanner sc = new Scanner(System.in);

                 int n = 5;      

                ArrayList<Integer> grades = new ArrayList<Integer>(n);

               for (int i = 1; i <= n; i++)

                {

                       System.out.print("Enter a grade (between 0 and 100): ");

                       int num = sc.nextInt();

                       grades.add(num);

                }

                int max = grades.get(0);

                for (int i = 1; i < n; i++) {

                       if (grades.get(i) > max) {

                             max = grades.get(i);

                       }

                }

               System.out.print("The highest grade is: "+max);

       }

}

Explanation:

The class HighestGrade application rompts the user for five grades between 0 and 100 points and stores  the grades in an ArrayList. HighestGrade then traverses the grades to determine the highest grade and then displays the grade along with an appropriate message.

The term for an operator that may not evaluate one of its subexpressions is

Answers

Answer:

short-circuit

Explanation:

def test() : # do not change this line!
values = [4, 7, 8, 9, -5] # do not change this line!

# write your code here so that it modifies values

# be sure to indent your code!

print(values)
return values # do not change this line!
# do not write any code below here

test() # do not change this line!
# do not remove this line!

Answers

I’m sorry this is unclear . What exactly do you need .

See if you can do better then I did

Answers

Answer:

no i can't do better ggs

Explanation:

im not smart (also I did answer the question ;) )

Other Questions
if tu = 6 units, what must be true? su + ut = rt rt + tu = rs rs + su = ru tu + us = rs Jacoby made and sold x candy bars in one week. His profit, P, in dollars is calculated using the formula P = R-Cwhere R represents his revenue and C represents his costs. If R = 3x^2 x+ 6 and C = -7x^2 7x + 2. what isthe expression that represents his profit in dollars? In the Ukraine, who travels with Father Frost when he delivers gifts? I bet you know the story of the tortoise and the hare. The race between the two is famous. Here is just some of the data from their race. If you remember the story, then you know that the tortoise won. The data table shows one reason why. Using the data from the table, decided which animal stopped moving and when. A) the hare, during minute 2 B) the hare, during minute 3 C) the tortoise, during minute 2 D) the tortoise, during minute 4 Another help!!! Good points fake response =report Which graph represents a function??? Who should you look closely at to figure out the theme of the play SEP Construct Explanations You can see a cloud of your breath outsideon a cold day but not on a warm day. What do you think is happening topour breath in the cold air What type of business is formed with the primary purpose of serving its user- members? O A. Partnership O B. Corporation O C. Sole proprietorship O D. Cooperative Form 8B were investigating how a metal bar expands while being heated. The barwas originally 30 cm in length and it expanded to 31.75 cm.Calculate the percentage increase in length. Give your answer correct to 1 decimalplace. What is the product of (x2 + 3x + 9) and ( 2x + 7)? If a letter of the alphabet is chosen at random, what is the probability that it will be a vowel? (Y is not a vowel.) a. 1/2 b. 3/13 c. 1/5 d. 5/26 Please select the best answer from the choices provided A B C D The Declaration of Independence asserted which principle as a basis for colonial separation from Britain? Write sentences that explain the following.13. what many students in Latin America have to wear to school Stories can be told well in movies, but the best way to tell a story is in the pages of a novel. Novelists can develop characters fully and sustain readers' suspense for many chapters.Which words reveal that the sentence includes subjective writing?O in moviesO the best wayO develop characters fullyO for many chapters How is cytokinesis different in plants and animals? A line passes through the points (-4,1) and (-3,3). This line can be modeled by the equation y = mx + b.Complete the table to determine the values of m and b. What was sheriff Tate's rationale for not revealing Arthur Radley's role ??? Please help ! What's the correct entry to record a tool purchase of $500?. GEOMETRY QUESTION NEED HELP ASAP 50 POINTS PLEASE PUT FULL ANSWER!!!! 2 part question find the answer to the one in the picture also find the measure of angle 7 also please