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
s344n2d4d5 [400]
3 years ago
14

Assume that name is a variable of type string that has been assigned a value . write an expression whose value is the first char

acter of the value of name . so if the value of name were "smith" the expression 's value would be 's'.
Computers and Technology
1 answer:
4vir4ik [10]3 years ago
7 0

For the first question, you would just add the parenthesis to the string mutation1:

String word = "sadly";

String mutation1 = "(" + word + ")";

For the second you need the method substring from the String class:

It is defined as String.substring(begining, ending);

String name = "Smith";

String firstCharacter = name.substring(0, 1);

0 is considered the beginning of the string, then you get the next 1 characters.

You might be interested in
The UIDs for a set of hierarchical entities can be propagated through multiple ________ relationship
SOVA2 [1]

The unique identifier (UIDs) for a set of hierarchical entities can be propagated by using multiple <u>barred</u> relationship.

<h3>What is a UID?</h3>

UID is anacronym for unique identifier and it can be defined as an alphanumeric or numeric string that is associated with a single entity or unique among all identifiers within an information system (IS).

This ultimately implies that, unique identifier (UIDs) are identifiers that marks a particular record within an information system (IS) as unique from every other record.

In Computer science, the unique identifier (UIDs) for a set of hierarchical entities can be propagated by using multiple <u>barred</u> relationship because they represent the relationships between the originating entities and the intersection entity.

Read more on a unique identifier here: brainly.com/question/25619349

5 0
3 years ago
How can social media give you knowledge
cupoosta [38]
Social Media can you knowledge by most users on Social Media spreading their own knowledge.
5 0
3 years ago
A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set
Vanyuwa [196]

Answer:

from functools import reduce

def mean(mylist):

   score = reduce(lambda x,y: x + y, mylist)/ len(mylist)

   return score

def median(mylist):

   sorted(mylist)

   list_len = len(mylist) % 2

   i = round(len(mylist)/2)

   x = len(mylist)//2

   if list_len == 0:

       median = (mylist[x] + mylist[x+1]) / 2  

   else:

       median = mylist[i]

   return median

def mode(mylist):

   unique = set(mylist)

   unique = list(unique)

   collector = [mylist.count(key) for key in unique]

   maxi = max(collector)

   loc = collector.index(maxi)

   return unique[loc]

def main():

   scores = input( 'Enter list of numbers: ').split(",")

   scores = [int(score) for score in scores]

   

   operation = input('Enter operation: ')

   operator = ['mean', 'median', 'mode']

   

   for x in iter(list, 0):

       if operation in operator:

           break

       print("Invalid operation: ")

       operation = input('Enter operation')

   

   index_loc = operator.index(operation)

   

   if index_loc == 0:

       return mean(scores)

   elif index_loc == 1:

       return median(scores)

       #return np.median(scores)  can be used of the defined function

   elif index_loc == 2:

       #return stats.mode(scores)[0]  can be used of the defined function

       return mode(scores)

print( main( ) )

Explanation:

The main python function calls conditionally three statistical functions namely mean, median and mode. It prompts for user input for a list of integer numbers and a function name name to return the corresponding result.

8 0
3 years ago
What is two examples of software and hardware?​
yanalaym [24]

Answer:

Hardware Software

If hardware is damaged, it is replaced with new one. If software is damaged, its backup copy can be reinstalled.

Ex: Keyboard, Mouse, Monitor, Printer, CPU, Hard disk, RAM, ROM etc. Ex: Ms Word, Excel, Power Point, Photoshop, MySQL etc.

Explanation:

5 0
3 years ago
Read 2 more answers
Michael has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use?
Kitty [74]
Artistic effects under design?
8 0
3 years ago
Other questions:
  • After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude featu
    11·1 answer
  • Gary lives in an area that receives high rainfall throughout the year. Which device would be useful to him to maintain his compu
    10·2 answers
  • ______ are segments of computer code that attach to existing computer programs and perform malicious acts. select one:
    7·1 answer
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was
    12·2 answers
  • Edhisive 3.5 code practice
    9·1 answer
  • The most common threats to your computer and your online safety come from what is called ____
    11·2 answers
  • I need help, thank you
    7·1 answer
  • write a program in pseudo code to solve the following: covert a temperature input in degrees Celsius to degrees Fahrenheit and d
    14·1 answer
  • Which of the following situations is least likely fair use
    6·2 answers
  • Weak passwords are a(n) ___________ threat
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!