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
Gekata [30.6K]
3 years ago
12

1. Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were ass

ociated with "41" then the resulting int would be 41.2. Write an expression whose value is the last character in the str associated with s.
3. Given variables first and last, each of which is associated with a str, representing a first and a last name, respectively. Write an expression whose value is a str that is a full name of the form "Last, First". So, if first were associated with "alan" and last with "turing", then your expression would be "Turing,Alan". (Note the capitalization! Note: no spaces!) And if first and last were "Florean" and "fortescue" respectively, then your expression’s value would be "Fortescue,Florean".

4. Write an expression whose value is the result of converting the int value associated with x to a str. So if 582 was the int associated with x you would be converting it to the str "582".

5. Write an expression whose value is the str consisting of all the characters (starting with the sixth) of the str associated with s.

Computers and Technology
1 answer:
maksim [4K]3 years ago
7 0

Answer:

The solution or expression for each part is given below:

  1. int(s)
  2. s[len(s)-1]
  3. last.capitalize()+','+first.capitalize()
  4. str(x)
  5. s[5:]

Explanation:

Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.

All the images below are respective to the questions given.

You might be interested in
Discuss what repetitions structures are, and how they differ from the vectorization approaches we have previously studied in the
gogolik [260]

Repetition structures, or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next. Vectorized mathematical code appears more like the mathematical expressions found in textbooks, making the code easier to understand. That is the difference. Hope I could help you on Brainly.com!

6 0
3 years ago
Why are mobile apps often easier to develop than desktop apps?
Karo-lina-s [1.5K]

Answer:

Mobile app creation platforms are available that reduce the need to code.

Explanation:

Simple app creation softwares and tools are all over the place for mobile app creation. To create a mobile app, no coding knowledge or experience is needed unlike desktops apps that requires the knowledge of some coding languages like python, JavaScript etc.

The availability of these softwares and platforms have made mobile apps creation easy.

6 0
3 years ago
I watched an ad but the im button done is no where in sight, has anyone else experienced this recently. it was fine a few days a
Maurinko [17]

Answer:

This is usually just a small glitch that happens sometimes when you are seeing an ad and wanting to skip. Simple fixes to this problem include refreshing the browser or closing the application that you are in. This also would happen to me but following this fix should help with the problem.

7 0
2 years ago
Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
mezya [45]

Answer:

Follows are the code to this question:

import java.util.*;//import packae for user-input  

public class Main//defining a class Main

{

public String[] getArray(int numString)//defining a method getArray

{

String[] name=new String[numString];//defining array of String values

Scanner in = new Scanner(System.in);// creating scanner class object for input values from user-end

for(int i=0;i<numString;i++)//defining for loop for input multiple values

{

System.out.print("Enter String Value :");//print message

name[i]=in.nextLine();//input values

}

return name;//return array values

}

public String getLongestString(String[] sArray)//defining a method getLongestString

{

int m=0,mi=0; //defining integer variables

for(int i=0;i<sArray.length;i++)//defining for loop for check the longest value in array

{

if(m<sArray[i].length())//defining if block that checks m varaible value greater then sArray length  

{

m=sArray[i].length();//use m to hold sArray length

mi=i;//use max_index to hold i that is loop value

}

}

return sArray[mi];//return Longest value

}

public static void main(String[] args)//defining main method

{

Main s=new Main();//Creating object of main class    

String[] n;//defining string variable n  

n=s.getArray(5);//use n varaible to call getArray method and store its value

System.out.println("Longest value is: "+s.getLongestString(n));//use print method to call getLongestString method

}

}

Output:

please find attached file.

Explanation:

In the given java program code, inside the main class two method that is "getArray and getLongestString", is defined, in which the "getArray" method uses an integer variable in its parameter and inside the method, an array is defined that use a  scanner class for input array value.

  • In the "getLongestString" pass as a parameter and inside the method, two integer variable "m and mi" is defined that use in the loop to return the longest string value.
  • In the class main method is to define that creates a class object and call the above method and use the print method to return its value.  

4 0
3 years ago
Respond to the following in three to five sentences. Select the workplace skill, habit, or attitude described in this chapter (a
Katyanochek1 [597]

Answer:

communication and proactive

Explanation:

Communication is the most important thing and not only for a successful employee, is for successful life, in a company, there are a lot of people working in different areas, and sometimes we must interact with other departments to complete the task, a good communication help us to create a good experience and relationship with our partners, we're going to get efficient results.

If we want to ask more resources to our boss, we must show the needs and the benefits that company going to get, with a good presentation, inform and communication this can be easy to do, or if we are the boss, and we want to give trust our employees, we must have a good communication skills.

If we are proactive, we are going to result in almost every problem, in some companies the training is bad, we must learn process and attitudes for our job, some people are stingy with the knowledge, and we must find solution for our self, in this way we're going to be more independent, and our value increase in the company and even in the working market.

7 0
3 years ago
Other questions:
  • Informs the network interface card to pass packets sent to that address to the ip stack so their contents can be read, and tells
    9·1 answer
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • What happens as the key length increases in an encryption application?
    8·1 answer
  • You are utilizing BitLocker Drive Encryption, and are attempting to update Windows Server 2016. What must be done so that the up
    14·1 answer
  • Most operating systems perform these tasks.
    7·2 answers
  • An ____ is an object that produces each element of a container, such as a linked list, one element at a time.
    13·2 answers
  • Plz subscribe my yt gaming channel <br>FIREAZZ GAMING​
    8·2 answers
  • Choose the true statement below. (html)
    5·1 answer
  • Can you please help me
    9·1 answer
  • Cite some improved technology this 2021?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!