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 typically comprised of a mix of ________ and ________.
zaharov [31]
Your answer is "Mutual funds; stocks; bonds".
8 0
3 years ago
Read 2 more answers
ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed freq
never [62]

Answer:

True

Explanation:

Solution

ZigBee uses unlicensed frequency bands but operate at slower speed or data rates.

ZigBee: This communication is particular designed for control and sensor networks on IEEE 802.15.4 requirement for wireless personal area networks (WPANs), and it is a outcome from Zigbee alliance.

This communication level defines physical and  (MAC) which is refereed to as the Media Access Control layers to manage many devices at low-data rates.

6 0
3 years ago
1. You have been contracted to design a system for a smart car. The company installed four laser radars on the car’s corners to
Alexxandr [17]

Answer:

A). Using a flowchart, show the algorithm for the car collision avoidance system.

Explanation:

5 0
2 years ago
The library Wi-Fi kiosk requires a symmetric connection to the Internet. Which WAN technology would probably be the least expens
kenny6666 [7]

Answer:

The answer is IP-sec.

Explanation:

0.75 miles of range is a low distance for a WAN (Wide Area Network) so a point-to-point WAN tehcnology such as IP-sec or SD-WAN can be preferred. But the least expensive option would be choosing IP-sec as specified in the question.

I hope this answer helps.

6 0
3 years ago
Write the definition of a function named alternator that receives no parameters and returns true the first time it is invoked, r
Nataly [62]

Answer:

The solution code is written in C++

  1. bool STATUS = true;
  2. bool alternator ()
  3. {
  4.    if(STATUS){
  5.        STATUS = false;
  6.        return true;
  7.    }else{
  8.        STATUS = true;
  9.        return false;
  10.    }
  11. }

Explanation:

We need a global variable to track the status of true or false (Line 1).

Next, create the function alternator (Line 2) and then check if current status is true, set the status to false but return the previous status boolean value (Line 5-6). At the first time of function invocation, it will return true.

The else block will set the STATUS to true and return the false (Line 7-9).

3 0
2 years ago
Other questions:
  • Which of these definitions BEST explains what plagiarism is:
    14·2 answers
  • )1-bit sign, 8-bit exponent, 23-bit fraction and a bias of127 is used for ___________ Binary Floating PointRepresentation
    11·1 answer
  • What is the requirement for self-contained recovery devices
    6·1 answer
  • Which query will give the following result when it it applied on table 1????!!!!!
    10·1 answer
  • 1. row a statement you submit to get paid for a product or service 2. spreadsheet software used by many business professionals t
    5·1 answer
  • PowerPoint Presentation on What type of device will she use to display her presentation and explain it to the rest of the childr
    13·2 answers
  • If metal shims are used for alignment adjustment in the front, they adjust ________.
    5·1 answer
  • 3.1.2 Quiz: What Can Information Technology Do for You? Question 8 of 10 What is one reason why a business may want to move enti
    7·1 answer
  • Task 1
    9·1 answer
  • Javascript and java are really just two slightly different names for the same language.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!