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
________ are devices in a computer that are in either the on or off state
Vanyuwa [196]
The appropriate response is Electrical Switches. These are electromechanical gadgets that are utilized as a part of electrical circuits to control, recognize when frameworks are outside their working reaches, flag controllers of the whereabouts of machine individuals and work pieces, give a way to manual control of machine and process capacities, control lighting, et cetera.
6 0
3 years ago
Cite los botones de edición que existen y determine en que ficha y grupo se encuentran.
Alina [70]

Answer:

GHRUDIFDSFHEOUSDHFHESDHFHEFE

Explanation:

SORRY I DONT KNOW

5 0
3 years ago
(e) The vending machine stores the quantity of items available in a database table called ITEMS
zimovet [89]

Answer:

a1,a2,62,

please mark brainliest

Explanation:

8 0
2 years ago
An engineer created three VSANs on the Cisco MDS switch. VSAN 100 is allocated to the marketing department, VSAN 110 is allocate
SCORPION-xisa [38]

Answer:

Option B i.e., mdsswitch# show Vsan membership is the correct option.

Explanation:

The following commands is used by the engineer because it displays the membership of the VSAN( virtual storage area network).

switch# command is used to enter the configuration mode. So, the engineer using the following commands to verify that the interfaces for the research department.

7 0
3 years ago
Is OS X a mobile operateing system
hodyreva [135]
Hello Williamsdarlene,
After reading your question, the answer to this question is:
No, OS X is not a mobile operating system. It is for computers.

Hope this helps!
3 0
3 years ago
Read 2 more answers
Other questions:
  • What file formats can you safely use in a video presentation
    14·1 answer
  • Due to the internal style sheets of some browsers, your website may look different to someone who is using firefox as opposed to
    11·1 answer
  • Which extensions can help drive installs of your mobile app?
    12·1 answer
  • Can i have information about skrillex hobbies
    6·1 answer
  • Call 334-399-4201 to annoyed my mom
    13·1 answer
  • What was the first video game ever invented
    11·2 answers
  • Assume that you have an ArrayList variable named a containing 4 elements, and an object named element that is the correct type t
    9·1 answer
  • Alexi is writing a program which prompts users to enter their age. Which function should she use?
    6·2 answers
  • What is the importance of the international employment​
    8·2 answers
  • 23. ____________ is a slide that is used as the base design theme for other slides.​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!