Concentrate strings
Write code that concatenates the character strings in str1 and str2, separated by a space, and assigns the result to a variable named joined. Assume that both string variables have been initialized.
Two Letters in Word
Given a character string stored in a variable called word, write code that concatenates the fifth character of the word to the third character from the end of the word, and assigns that string to a variable named two_letters. Assume that word already has a value and is at least five characters long.
Set the Number of Cards if Necessary
Write code that sets the value of the variable num_cards to seven if its current value is less than seven. Otherwise, don't change the value. Assume that nuncards already has an initial value.

Answers

Answer 1

Answer:

In Python:

(a) Concatenate strings:

joined = str1+" "+str2

(b) Two Letters in Word :

two_letters = word[4]+word[-3]

(c) Set Numbers in Card

if num_cards < 7:

    num_cards = 7

Explanation:

The code segments were written in Python

All variables were assumed to have been initialized

Solving (a): Concatenate strings:

To do this, we make use of + operator.

So, the concatenation of str1 and str2 with space in between is

str1+" "+str2

When assigned to variable joined, it becomes

joined = str1+" "+str2

Solving (b): Two Letters in Word :

The character at the 5th position is represented with index 4 i.e. word[4]

To access a character from the end, we make use of - sign. So, the third character from the end is word[-3]

Concatenate them using + operator.

So, we have:

two_letters = word[4]+word[-3]

Solving (c): Set Numbers in Card

Here, we make use of the if condtion.

First, check if num_cards is less than 7(i.e. num_cards < 7)

If true, assign num_cards to 7

So, we have:

if num_cards < 7:

    num_cards = 7


Related Questions

Four reasons why computers are powerful

Answers

Answer:

You could search up almost anything you want

they have a lot of storage

you can find good information

they help you with a lot of things

Explanation:

also how they can process information in seconds

20 pts The Domain Name System translates the URL into
A. client
B. an IP address
C. a website
D. a web browser

Answers

B AN IP ADDRESS hope this helps you

Answer:

adress

Explanation:

For which of the following tasks would a for-each loop be appropriate?
A. Reversing the order of the elements in an array.
B. Printing all the elements at even indices of an array.
C. Printing every element in an array.
D. Determining how many elements in an array of doubles are positive.
E. Determining whether an array of Strings is arranged in alphabetical order.
F. Printing every even number in an array of ints.

Answers

Answer:

The answer is "Option B, C,  and F".

Explanation:

In the For-each loop, it is used for traversing items in a sequence is the control flow expression. It typically required a loop becomes referred to it as an enhanced loop for iterating its array as well as the collection elements. This loop is a version shortcut that skips the need for the hasNext() method to get iterator and the loop and over an iterator, and the incorrect choice can be determined as follows:

In choice A, it is wrong because it can't reverse the array element.In choice D, it is wrong because it can't determine the array of positive.In choice E, it is wrong because it can't determine an array of the sting in alphabetical order.

Pls help I don’t know the answers

Answers

Answer:

1. DLL Files.

2. System software repair.

3. Software configuration.

4. Human-computer interaction.

5. A graphical user interface (GUI).

Explanation:

1. DLL Files can become lost or damaged on a computer and prevent it from working correctly. These are important registry files used by various system softwares to perform specific tasks.

2. System software repair is a type of software you can run to help fix computer problems. Some examples are disk defragmenter, regedit, etc.

3. Software configuration means the process of setting up an application and selecting specific options. This is usually done in the settings section of a software application or program.

4. Human-computer interaction is the name of the discipline concerned with the design of optimal user interfaces.

5. A graphical user interface (GUI) is what users make use of to interact with graphical icons and other visual elements in order to accomplish tasks.

Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and returns the number of elements in the list within that range inclusive. For example, if the list v contains {28, 1, 17, 4, 41, 9, 59, 8, 31, 30, 25}, the call of countInRange(v, 10, 30) should return 4. If the list is empty, return 0. Do not modify the list that is passed in.

Answers

Answer:

In Java:

The method is as follows:

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {  

       int count = 0;

       for (int i = 0; i < MyList.size(); i++)  {

           if(MyList.get(i)>=min && MyList.get(i)<=max){

               count++;

           }  

       }

       return count;

 }

Explanation:

This defines the method

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {

This declares and initializes count to 0  

       int count = 0;

This iterates through the ArrayList

       for (int i = 0; i < MyList.size(); i++)  {

This checks if current ArrayList element is between min and max (inclusive)

           if(MyList.get(i)>=min && MyList.get(i)<=max){

If yes, increase count by 1

               count++;

           }  

       }

This returns count

       return count;

 }

To call the method from main, use:

countInRange(v,m,n)

Where v is the name of the ArrayList, m and n are the min and max respectively.

which of the view will show you a view very similar to the Print view​

Answers

Answer:

Print Layout view is the one most closely related to what your document will look like when you actually print it. (In some versions of Word this view may be called Page Layout view.) ... This is the viewing mode you should use if you want to always see what your document will look like.

Explanation:

I hope this helps and pls mark me brainliest :)

Which Backstage view feature helps you to specifically remove customized information from a document? Protect Document Feedback Properties Manage Document

Answers

Explanation:

Properties. 100% correct. goodluck.

Answer:

properties on edg.

Explanation:

Write a Java program that takes as input a paragraph as a String and identifies if any of the words in the paragraph is a $1.00 word. The value of each word is calculated by adding up the value of each one of its characters. Each letter in the alphabet is worth its position in pennies i.e. a

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Enter paragraph: ");

 String para = input.nextLine();

 String[] para_words = para.split("\\s+");

 for (int i = 0; i < para_words.length; i++) {

     para_words[i] = para_words[i].replaceAll("[^\\w]", "");

     char[] eachword  = para_words[i].toCharArray();

     int penny = 0;

     for(char c : eachword){

         int value = (int)c;

         if(value<=122 && value>=97){   penny+=value-96;     }

         else if(value<=90 & value>=65){  penny+=value-64;  }

     }

     if(penny == 100){

         System.out.println(para_words[i]);

     }

       penny = 0;

}

}

}

Explanation:

Due to the length of the explanation, I've added the explanation as an attachment

Four reasons why computers are powerful

Answers

Answer:

Computers are powerful tools because they can process information with incredible speed, accuracy and dependability. They can efficiently perform input, process, output and storage operations, and they can store massive amounts of data. ... Midrange servers are bigger and more powerful than workstation computers.

identify the web browser used in your school lab or at home.why do you think there need to be more than one browser.​

Answers

Answer:

Chrome, Edge, and Firefox.

Explanation:

Utilizing different browsers make sense depending upon websites that you are using. Not every site is optimized for one standard browser. Also, Microsoft has discontinued supporting their Internet Explorer browser. That means they no longer update, share security patches, or support it. Some websites or software works better with the Chrome browser, while it is not optimized for others. When looking at websites using Firefox, if the site isn't optimized for it, the site layout will not be easily read or used. Clicking on links on the browser can cause errors or a malfunction. A variety of coders, software authors or companies create sites or software using different code and algorithms. That is the basis of differences in site and software functionality.

The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's cost. Design an algorithm that prompts the user to input the list price of the car and print the least amount that the dealer would accept for the car.

Answers

Answer:

Explanation:

The following code is writen in Python. It is a function called minPrice. It asks the user to input the list price of the vehicle and then multiplies that by 0.85 in order to get the dealer's cost. Then it adds 500 to that price and returns it to the user as the minimum price that the dealer would accept for the car.

def minPrice():

   list_price = input("Please enter the list price of the car: ")

   dealers_cost = int(list_price) * 0.85

   min_accepted_price = dealers_cost + 500

   print(min_accepted_price)

Match the tasks with the professionals who do them.

Answers

Answer:

purchasing agent: negotiate contracts with suppliers

attend conferences and trade shows to find new products

office clerk: file paperwork according to a filing system in the office

type data into software to be used by the company

freight forwarder: calculate the weight and volume of cargo

track shipments to make sure that they arrive on time

(True/False). Will this SQL statement create a table called vehicletype? CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Answers

Answer:

True

Explanation:

This  SQL statement that is used to create a table called vehicletype "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement.

What is the SQL statement?

An SQL is a term that connote for Structured Query Language. SQL is known to be a type of statement that is often used  to query and alter the relational databases such as SQL Server.

Conclusively, This  SQL statement that is used to create a table called vehicletype  "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement becaue it is the right step to take when creating it.

Learn more about  SQL statement  from

https://brainly.com/question/27089762

The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the user for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.

Answers

Answer:

# price of the carpet per square foot for each quality.

carpet_prices=[1,2,4]

def cal_cost(width,height,choice):

 return width*height*carpet_prices[choice-1]  

width=int(input("Enter Width : "))

height=int(input("Enter Height : "))

print("---Select Carpet Quality---")

print("1. Standard Quality")

print("2. Primium Quality")

print("3. Premium Plus Quality")

choice=int(input("Enter your choice : "))

print(f"Carpeting cost = {cal_cost(width,height,choice)}")

Explanation:

The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.

The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.

(Python) Write an expression that prints 'You must be rich!' if the variables young and famous are both True. Sample output with inputs: 'True' 'True' You must be rich!

Answers

Answer:

young = True

famous = True

if young == True and famous == True:

   print("You must be rich!")

Explanation:

16. Select the correct answer.
Which printer translates commands from a computer to draw lines on paper using several automated pens?
A.
dye-sublimation printer
B.
plotter
C.
laser printer
D.
inkjet printer
E.
photo printe

Answers

Answer: Plotter-- B

Explanation:

A Plotter is  sophisticated  printer that get commands from a computer and interprets them to draw high quality lines or vector  graphics on paper  rather than dots using one or several automated pens. This makes them useful in the area of  CAD , architecture drawings and engineering designs. The types of plotters we have include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.

The correct option is B. Plotter.

The following information should be considered:

A Plotter is sophisticated printer that received commands from a computer and interprets them to draw high quality lines or vector  graphics on paper instead than dots using one or several automated pens. This makes them useful in the area of CAD , architecture drawings and engineering designs. The types of plotters include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.

Learn more: brainly.com/question/17429689

Pls awnser right awnsers only

Answers

Answer:

2, 4, and 5

Explanation:

Given the number of every players of two cricket team to find the winner team and find total half-century,in C program

Answers

Answer:

podrías especificarla mas por favor

(a) List 5 keys we can type with our left hand fingers
(b) List 5 keys we can type with our right hand fingers​

Answers

Answer:

A) a,s,d,f, and either g or caps lock

B) l,k,j,h, and, ;

Explanation:

4. Select the correct answer.
Which file format combines different layers of information (text, images, tables, and so on) into one layer in the file?
A.
GIF
B.
PDF
C.
BMP
D.
TIFF
E.
PNG

Answers

Answer: B.  PDF

Explanation:

Portable Document Format (PDF) is such an important document that it is considered the international standard for information and document exchange. It is used for letters, resumes and even electronic contracts.

PDF was developed by Adobe to make it independent of the device or application it is being viewed on and combines layers of information into one layer thereby making it a flat document.

Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are combined to form the
final file. Which type of version control process does Leslie's company use?
OA.
file merging
ОВ.
file locking
Ос.
file subversion
OD.
file conversion
O E.
file diversion

Answers

Answer:

file subversion

Explanation:

File subversion is compliant with the copy-modify-and merge model. Here, users make personal working copies which they can adjust concurrently. After the adjustments, the files are merged into a final copy by the version control system or someone.

This is similar to the version control process of Leslie's company. The team members all save their altered versions of the files which are then finally merged into one final file.

True or False
3.The title tag defines a title for the page on the browser's Title bar.​

Answers

Answer:

it would be false because of the word tag you can title a browser bar tag

Explanation:

cause it would be improper

True or False
4. The Timeline is a window at the bottom of the Stage which is divided into frames.​

Answers

Answer:

I think the answer is true

Work-based learning can be defined as educational experiences that focus on

Answers

Answer:

Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

Explanation:

Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

What is Work based learning?

The broad term "work-based learning" (WBL) is used to describe activities that involve employers and schools working together to provide students with structured learning experiences.

By giving students the chance to apply the knowledge and skills they have learned in the classroom to actual circumstances, a good WBL program can increase the relevance of school-based learning.

Both the workplace and the school support work-based learning. While work site learning takes place outside of school in a company or other community group, school-based learning concentrates on academic and career preparation as part of the classroom curriculum.

Therefore, Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

To learn more about Work based learning, refer to the link:

https://brainly.com/question/13597551

#SPJ2

What is an embedded computer? explanation

Answers

Answer: embedded computer

Explanation: An embedded computer is a microprocessor-based system, specially designed to perform a specific function and belong to a larger system. It comes with a combination of hardware and software to achieve a unique task and withstand different conditions.

Answer:

An embedded computer is a computer that has been built to solve only a very few specific questions and is not easily changed.it has a processor, software, input and output.examples are: calculator, digital camera, elevator, copiers, printers.

The _____________computer function accepts data from input devices and sends it to the computer processor.

Question 9 options:

Input


Memory


Storage


RAM

Answers

Answer: input

Explanation:

The computer function that accepts data from the input devices and sends it to the computer processor is refered to as the input function.

The input device is referred to as a hardware device which is used in sending data to a computer. Some examples of input devices that we have keyboard, mouse etc.

Draw a flowchart diagram for a program that display a person's name x times​

Answers

Answer:

See attachment for flowchart

Explanation:

The flowchart is as follows:

Step 1: Start

This signals the beginning of the flowchart

Step 2: Input name, x

This gets input for name and x from the user

Step 3: count = 0

This initializes count to 0

Step 4: Print name

This prints the person's name

Step 5: count = count + 1

This increments the number of times the name has been printed

Step 6: count = x?

This checks if the number of times the name has been printed is x times

If yes, step 7 is executed.

If no, step 4 is executed

Step 7: Stop

This signals the end of the flowchart

This is a Java programWrite a method with the following header to format the integer with the specified width. public String format(int number, int width) The method returns a string for the number with one or more prefix 0s. The size of the string is the width within the range 1 to 10000inclusive. For example, format(34, 4) returns 0034 and format(34,5) returns 00034. If the number is longer than the width, the method returns the string representation for the number. For example, format(34, 1) returns 34. Assume that, the size of the string is the width within the range 1 to 10000 inclusive and the number is an integer -2147483648 to 2147483648 inclusive.Input 34 4Output 0034You must use this particular Driver classclass DriverMain{public static void main(String args[]){Scanner input = new Scanner(System.in);int num = Integer.parseInt(input.nextLine().trim());int width = Integer.parseInt(input.nextLine().trim());GW6_P5 gw6P5 = new GW6_P5();System.out.print(gw6P5.format(num,width));}

Answers

Answer:

Following are the code to this question:

import java.util.*;//import package  

public class DriverMain//defining a class DriverMain

{

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

{

int num,width;

Scanner input = new Scanner(System.in);//creating Scanner class fore user input

num = Integer.parseInt(input.nextLine().trim());//input value

width = Integer.parseInt(input.nextLine().trim());//input value

GW6_P5 gw6P5 = new GW6_P5();//creating base class object

System.out.print(gw6P5.format(num,width));//print method that calls base class format method

}

}

class GW6_P5 //defining base class GW6_P5

{

String format(int number, int width)//defining method format that takes two integer variable in its parameter  

{

String s = ""+number;//defining s String variable that holdes integer value

int digitCount = 0;//defining integer variable

while(number!=0) //defining while loop to check value is not equal to 0

{

digitCount++;//incrementing the integer variable value

number/=10;//holding quotient value

}

if(width>digitCount)//defining if block that checks width value greather then digitCount value  

{

for(int i=0;i<width-digitCount;i++)//defining for loop to add 0 in String variable  

{

s = "0"+s;//add value

}

}

return s;//return String value

}

}

Output:

34

5

00034

Explanation:

In the given code, a class "DriverMain" is defined, and inside the class main method is defined that defines two integer variable "num and width", that uses the scanner class to input the value, and in the next step the "GW6_P5" class object is created that calls the format method and print its values.

In the class "GW6_P5", the format method is defined, that declared the string and integer variables, in the while loop it checks number value not equal to 0, and increments the number values, and in the for loop it adds the 0 in string value and return its value.

Is this right ? Please helppppp 0111111110101011010111000010101011101010110010110101010110101110
How many nibbles are in the bit string? 5 nibbles
I
How many Bytes are in the bit string? 10 bytes
What is the bit size name for this bit string? 15/

Answers

Answer: 4054

Explanation:

i LEARND IT

Answer:

0111111110101011010111000010101011101010110010110101010110101110

How many nibbles are in the bit string? 16 nibbles

How many Bytes are in the bit string? 8 bytes

What is the bit size name for this bit string? 64

( PLZ HELP I WILL MARK MOST BRAINLIEST) A city is facing shortfall and may have to raise taxes before taking this step the mayor decides to form a task force of his supporters and opponents to study the issue and recommend solutions ,
What leadership qualities do the mayors actions demonstrate.

A. Collaboration
B. Time management skills
C. Effective communication
D. Following others

Answers

Answer:

collaboration

Explanation:

the mayor is working together with people and to make it have better sense an example would be the slang word collab that singers use when making a song together

Answer:

A. Collaboration

Explanation:

First off, I will explain why the other answers are incorrect. There is no discussion about time and how it is incorporated into the situation, so the answer cannot be "B.". "D." is not correct because the mayor is not following, he is leading. And "C." cannot be correct as the process hasn't even started yet. "A." IS the answer because the mayor is working together with other experts to help solve the situation.

Other Questions
please help asap!!!!the poem is I Remember, I Remember by Thomas Hood Please help me You are completing a word map on the word envious. Envious means "to feelor show envy or jealousy." What word could you put on the top right?A. HatefulB. TalkativeC. JealousD. Rude In 1936 the same year this propaganda was published, Germany occupied the Rhineland (land that was taken away from Germany following WW1). How might that event have influenced this piece of propaganda Multiply and divide decimals.One pound of chocolate chip cookies cost $3.79. David buys exactly 5 pounds of chocolate chip cookies. How much will the cookies cost? State Your answer. Give Details. Explain what you did and justify Your steps.And also, you'll get brain if u do these directions. :) In order to solve the equation below, what would be a valid first step? 4(x+8) =342x A. Simply x + 8 to 8x. B. Distribute the 4.C. Subtract x from both sides.D. Subtract 8 from both sides. Who can help me with this Lincoln ended up losing the seat to Douglas in 1858, but through a series of succinct and moving speeches that he gave during the race, he captured the attention of America. The "house divided" speech is Lincoln's first famous speech. He compared the nation to a housea simple but powerful metaphorand said the house "will become all one thing or all the other, meaning that slavery would either be abolished completely in both the North and South, or would become completely legal. Two years later, in 1860, Lincoln would become president.When Lincoln said the house "will become all one thing or all the other, he meant thatA. America would eventually choose between him and Stephen Douglas for president.B. all citizens either needed to become Democrats or Republicans for the country to be united.C. slavery would either be abolished throughout America or would become legal everywhere.D. America should remain divided because the North and South did not want the same things. 2.2 - , , .- , , - , , - , , , - , - , - . - : ? , . : , , , , . , - , - . , , , , , , . , , .- ? - , , : - ? , , :- . . , . - . - . Explain the impact that theunification of Germany had.In a complete sentence What did John Fitch build?a steam powered stagecoacha steam powered boata steam powered schoonera steam powered train If an atom has 5 protons, 5 neutrons and 5 electrons, what is the atom's atomicnumber and atomic mass? What does this experiment indicate about enzyme specificity? On chilly days, my dogs like to curl up on bed, sleep on a blanket , and if you were given a specimen of an active motile microorganisms which is the type microscope would be most effective in visualizing the live microbes How did the oil embargo in the 1970s affect the US economy?A) The rise in gasoline prices contributed to inflation.B) The government created lower national speed limits.C) People could not afford to drive to work, so they lost their jobs.D) The lower prices for gasoline meant people had more money to spend. Which statement is true based on the graph ? Complete the statement using the correct term.The ___ is the part of the story where the reader learns how the conflict will be resolved. A. Rising actionB. Falling actionC. Climax De quin es el poema "Maana se ir la vida"? Select all possible solutions for 2x + 7 < 3x - 5. Cheyenne bought 60 tickets for rides at an amusement park. Each ride costs 4 tickets, and Cheyenne has been on x rides so far. Write an expression is equivalent to the number of tickets that Cheyenne has left?