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
ser-zykov [4K]
3 years ago
14

Python 3 (not java)1.Assume that word is a variable of type String that has been assigned a value. Write an expression whose val

ue is a String consisting of the last three characters of the value of word. So if the value of word were "biggest" the expression's value would be "est".2.Given three String variables that have been given values, firstName, middleName, and lastName, write an expression whose value is the initials of the three names: the first letter of each, joined together. So if firstName, middleName, and lastName, had the values "John", "Fitzgerald", and "Kennedy", the expression's value would be JFK". Alternatively, if firstName, middleName, and lastName, had the values "Franklin", "Delano", and "Roosevelt", the expression's value would be "FDR".3.Write an expression that evaluates to True if and only if the variables profits and losses are exactly equal.
Computers and Technology
1 answer:
zhenek [66]3 years ago
8 0

Answer:

#part 1.

#declare and initialize string variable word

word="welcome"

# extract the last 3 characters of the string and print

print("last 3 characters of word is: ",word[-3:])

#part 2.

#declare and initialize string variables

firstName="John"

middleName="Fitzgerald"

lastName="Kennedy"

#print the initials of all names

print("initials of name is: ",firstName[0]+middleName[0]+lastName[0])

#part 3.

#declare and initialize profit and loss

profits=10

losses=10

# if will be true only when profits equals to losses

if profits==losses:

   print("both are equal")

Explanation:

In part 1, declare and initialize string variable word with "welcome" then extract last 3 characters of the string and print it. In part 2, declare and initialize names variable then find the first character of each name that is character at 0 index. Append all 3 and print that value. In part 3, declare and initialize profits with 10 and losses with 10. In the if condition, it will print  "both are equal" if both values are equal.

Output:

last 3 characters of word is:  ome                                                                                            

initials of name is:  JFK                                                                                                    

both are equal

You might be interested in
Why would it be unusual to find a fossil of an organism’s eye?
Slav-nsk [51]
<span>The preservation of anything other than mineral skeletons is (with a few exceptions described below) an extremely rare event. Anything that can decay is likely to be lost. Fur, skin, internal organs – all are immensely vulnerable to the destruction by bacteria, fungi and scavengers that assure their recycling back into the ecosystem. </span>
8 0
3 years ago
Your bank offers to lend you $114,400 at an 8.5% annual interest rate to start your new business. The terms require you to amort
wlad13 [49]

Answer: The amount of interest to be paid is $972

Explanation: This is gotten by firstly getting the amount of money to return per year without the interest which is $114400/10(years)= 11440

11440 is to be paid per year without interest. To get amount of interest is $11440*8.5/100 = $972 this is the amount of interest to be paid per year including in year 2.

Therefore, total amount of money together with interest to be paid each year and in year 2 = $11440+$972=12412.

3 0
3 years ago
List any four e-commerce website​
Ipatiy [6.2K]

Answer:

Amazon. Founded in the US in 1994, Amazon started as an online bookstore that later diversified to products including media, electronics, apparel, furniture, food, toys, and jewelry.

eBay. ...

Walmart. ...

Etsy. ...

Home Depot. ...

Target. ...

Best Buy. ...

Wayfair.

5 0
3 years ago
Read 2 more answers
Please help What two Boolean operators can you use to narrow your search results?
daser333 [38]

Answer:

if and and not and or ans all

7 0
3 years ago
In your own words, describe the advantages and disadvantages of the auto-negotiation protocol used in Ethernet communications.
dexar [7]

Answer:

 Auto-negotiation protocol is the modern technology in the networking. This protocol allow the ethernet equipment for automate different instillation steps. This type of protocol use by interconnecting various electronic devices for negotiating the speed of the link.  

Advantages:

  •  The auto negotiation protocol features used to maximize the throughput of data link layer.
  •  This protocol are basically useful in the local area network (LAN), with multiple capability of connections.
  •  The auto negotiation protocol extremely useful in twisted pair which are based on ethernet.

Disadvantages:

  •   This type of protocol are not fixed data links and not used as backbone of the networks.  
  •  Duplex mismatch occur then, it cause significant loss in the packets.

7 0
3 years ago
Other questions:
  • What is an example of asynchronous communication
    7·1 answer
  • List 7 internal components in a computer system
    8·2 answers
  • When you minimize a file, folder, or window it is placed on the
    10·1 answer
  • A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
    6·1 answer
  • If you were infiltrating a network (10.16.0.0/16), and searching for vulnerabilities (while trying to remain undetected), why wo
    11·2 answers
  • When replacing a thermostat or water pump, coolant drained from the cooling system should be ________.
    9·1 answer
  • What is the suffix of hollow?
    7·1 answer
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • Which of these is not enumerated as a motivation to create accessible web content?
    10·1 answer
  • Compared to using a command line, an advantage to using an operating system that employs a gui is ________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!