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
scZoUnD [109]
3 years ago
11

Assume that given, middle and family are three variables of type String that have been assigned values. Write an expression whos

e value is a String consisting of the first character of given followed by a period followed by the first character of middle followed by a period followed by the first character of family followed by a period: in other words, the initials of the name. So if the values of these three variables were "John" "Fitzgerald" "Kennedy", then the expression's value would be "J.F.K.".
Computers and Technology
1 answer:
kirill [66]3 years ago
8 0

Answer:

#program in Python

#variables

given="John"

middle="Fitzgerald"

family="Kennedy"

#find first character of each variable and ptint

print("{}.{}.{}".format(given[0],middle[0],family[0]))

Explanation:

Declare and initialize variables "given" with "John","middle" with "Fitzgerald"  and "family" wit "Kennedy".Print the first character of each variables separated by a "." in between of each character.

Output:

J.F.K  

You might be interested in
In 1981, Ian Murphy broke into the AT&T online computer system and changed their clocks, allowing people to make calls durin
poizon [28]
A. intentionally or recklessly disrupt, degrade, or destroy information or services on the computer
5 0
2 years ago
Give a big-O estimate for the number additions used in this segment of an algorithm.
rjkz [21]
Big-O notation is a way to describe a function that represents the n amount of times a program/function needs to be executed. 

(I'm assuming that := is a typo and you mean just =, by the way) 

In your case, you have two loops, nested within each other, and both loop to n (inclusive, meaning, that you loop for when i or j is equal to n), and both loops iterate by 1 each loop.

This means that both loops will therefore execute an n amount of times. Now, if the loops were NOT nested, our big-O would be O(2n), because 2 loops would run an n amount of times.

HOWEVER, since the j-loop is nested within i-loop, the j-loop executes every time the i-loop <span>ITERATES. 
</span>
As previously mentioned, for every i-loop, there would be an n amount of executions. So if the i-loop is called an n amount of times by the j loop (which executes n times), the big-O notation would be O(n*n), or O(n^2). 

(tl;dr) In basic, it is O(n^2) because the loops are nested, meaning that the i-loop would be called n times, and for each iteration, it would call the j-loop n times, resulting in n*n runs.

A way to verify this is to write and test program the above. I sometimes find it easier to wrap my head around concepts after testing them myself.
3 0
3 years ago
Tanya wants to include a video with all its controls on her web page. The dimensions of the video are as follows:
Snowcat [4.5K]
I think the answer is formats
4 0
3 years ago
Read 2 more answers
We begin with a computer implemented in single-cycle implementation. When the stages are split by functionality, the stages do n
vampirchik [111]

<u>Answer:</u>

a) First, we need to determine the pipeline stage amounting to the maximum time. In the given case, the maximum time required is 2ns for MEM. In addition, the pipeline register delay=0.1 ns.

Clock cycled time of the pipelined machine= max time+delay

=2ns+0.1 ns

=2.1 ns

b) For any processor, ideal CPI=1. However, since there is a stall after every four instructions, the effective CPI of the new machine is specified by:

1+(1 / 4)=1.25

c) The speedup of pipelined machine over the single-cycle machine=avg time per instruction of single cycle/avg time per instruction of pipelined.

Single cycle processor:

CPI=1

Clock period=7 ns

Pipelined processor:

Clock period=2.1 ns

CPI=1.25

Therefore, speedup==7^{*} 1 /\left(2.1^{*} 1.25\right)

=7/2.625

= 2.67

d) As the number of stages approach infinity, the speedup=k where k is the number of stages in the machine.

8 0
2 years ago
When pasting text and tables,which of these paste options is generally available
Taya2010 [7]

Answer:

For text and table in common: Keep Text Only

And hence, B. Paste as a text item is the correct option.

The above is the common option available in case we are pasting the Text or you are pasting the Table. If you copy a text and try to paste it, and when you will try to paste the table, then you will find this option in common, and hence it is the option that is generally available. Hence, B is the correct option.

Explanation:

Please check the answer section.

4 0
2 years ago
Other questions:
  • Look at the graph below. Which statement is TRUE based on the graph of an egg drop experiment?
    10·1 answer
  • Programming Using OOJAVA<br> check this Atterchment and solve Exascies 1, 2, and 3
    10·1 answer
  • PLEASE HELP ME ANSWER AS MUCH AS YOU CAN I ONLY HAVE 3 POINTS LEFT AND IM TIMED. PLEASE TELL ME THE NUMBER AND LETTER. THANK YOU
    5·1 answer
  • Plz help fast! will mark brainliest!<br><br>List three ways that music is used in modern society.
    6·1 answer
  • 50 POINTS How do you express yourself and your creativity through computer science?
    12·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary?
    6·2 answers
  • Which one of the statements best characterizes the current state of e-commerce?
    15·1 answer
  • The best presentations try to include as much text as possible on each slide true or false ​
    13·1 answer
  • You're making great progress on your assignment. You've defined the purpose of your message, identified both the primary and sec
    9·1 answer
  • True or False? Popular sites are always mean accurate.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!