Write a function called reverse Return that is almost the same job as reverse, but instead of printing the letters straight to the screen, it returns a String in which the letters have been reversed. The function call would look like:

Answers

Answer 1

Answer:

The function in Python is as follows:

def reverse(inputstr):  

   outputstr = ""

   for i in inputstr:

       outputstr = i + outputstr

   return outputstr

Explanation:

This defines the function

def reverse(inputstr):

This initializes the output string

   outputstr = ""

This iterates through the input string

   for i in inputstr:

This generates the output string by reversing the input string

       outputstr = i + outputstr

This returns the reversed string

   return outputstr


Related Questions

(CO 4 and 5) Create a program that will read in a list of test scores from the user and add them to a list. Ask the user in between each score if they want to continue (y/n). Display all of the scores entered and the total score at the end. Using the code below, put the code in the proper order Sample output: Welcome to the Test Score Program Add score: 88.45 Do you want to continue

Answers

Answer and Explanation:

Using Javascript:

function AddScores(){

Window.alert("Welcome to the Test Score Program");

var ScoreList= new Array();

ScoreList.push(Prompt("Add Score"));

var WhatNext= Confirm("do you want to continue?");

If(WhatNext===true) {

do{

ScoreList.push(Prompt("Add Score"));

}

While(

Confirm("do you want to continue?")===true;);

}

Alert(ScoreList);

Alert(ScoreList.reduce(function(a,b){return a +b};,0);)

}

AddScores();

From the above code in javascript programming language, we have created a list ScoreList and added elements to it using push method of the array object and a do...while loop that checks the condition and then adds the user's input to the array. We then alerted the array to the screen and then summed up the array elements and also alerted to the screen.

if a+1/a=3 find the valie of a^2+1/a^2​

Answers

Answer:

a² + 1/a² = 7

Explanation:

a + 1/a = 3 ; obtain the value of a² + 1/a²

Taking a + 1/a = 3

Squaring both sides ;

(a + 1/a)² = 3²

(a + 1/a)(a + 1/a) = a² + a/a + a/a + 1/a² = 3²

(a + 1/a)(a + 1/a) = a² + 1 + 1 + 1/a² = 9

a² + 2 + 1/a² = 9

a² + 1/a² = 9 - 2

a² + 1/a² = 7

Hence,

a² + 1/a² = 7

Write a static method named lowestPrice that accepts as its parameter a Scanner for an input file. The data in the Scanner represents changes in the value of a stock over time. Your method should compute the lowest price of that stock during the reporting period. This value should be both printed and returned as described below.

Answers

Answer:

Explanation:

The following code is written in Java. It creates the method as requested which takes in a parameter of type Scanner and opens the passed file, reads all the elements, and prints the lowest-priced element in the file. A test case was done and the output can be seen in the attached picture below.

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

class Brainly{

   public static void main(String[] args) throws FileNotFoundException {

       Scanner console = new Scanner(System.in);

       System.out.print("file location: ");

       String inputLocation = console.next();

       File inputFile = new File(inputLocation);

       Scanner in = new Scanner(inputFile);

       lowestPrice(in);

   }

   public static void lowestPrice(Scanner in) {

       double smallest = in.nextDouble();

       while(in.hasNextDouble()){

           double number = in.nextDouble();

           if (number < smallest) {

               smallest = number;

           }

       }

       System.out.println(smallest);

       in.close();

   }

}

You are designing an application at work that transmits data records to another building in the same city. The data records are 500 bytes in length, and your application will send one record every 0.5 seconds
Is it more efficient to use a synchronous connection or an asynchronous connection? What speed transmission line is necessary to support either type of connection? Show all your work.

Answers

Solution :

It is given that an application is used to transmit a data record  form one building to another building in the same city, The length of the data records is 500 bytes. and the speed is 0.5 second for each record.

a). So for this application, it is recommended to use a synchronous connection between the two building for data transfer as the rate data transfer is high and it will require a master configuration between the two.

b). In a synchronous connection, 500 bytes of data can be sent in a time of 0.5 sec for each data transfer.  So for this the line of transmission can be either wired or wireless.

A reflective cross-site scripting attack (like the one in this lab) is a __________ attack in which all input shows output on the user’s/attacker’s screen and does not modify data stored on the server.

Answers

Answer:

" Non-persistent" is the right response.

Explanation:

A cross-site category of screenplay whereby harmful material would have to include a transaction to have been transmitted to that same web application or user's device is a Non-persistent attack.Developers can upload profiles with publicly available information via social media platforms or virtual communication or interaction.

Design an if-then statement ( or a flowchart with a single alternative decision structure that assigns 20 to the variable y and assigns 40 to the variable z if the variable x is greater than 100?

Answers

Answer:

The conditional statement and its flowchart can be defined as follows:

Explanation:

Conditional statement:

if x>100 Then //defining if that check x value greater than 100

y=20//holding value in the y variable

z=40//holding value in z variable

End if

What help in executing commands quickly

Answers

Answer:99

Explanation:  Last summer, my family and I took a trip to Jamaica. My favorite part of the trip was when we went to a place called the Luminous Lagoon. We ate dinner and waited for the sun to go down. Then we boarded a boat and went out into the lagoon. That’s when the magic started.

At first we could not see very much in the darkness except for the stars in the sky. After a few minutes, however, I noticed some fish swimming in the water. They didn’t look like ordinary fish. These fish were glowing! Our guide explained that the glow came from tiny creatures in the water called dinoflagellates. These little animals are not visible to us, but their bodies produce light using something called bioluminescence, just like fireflies. There are so many of these creatures in Luminous Lagoon that the water around them seems to glow.

After our guide explained these facts to us, he told us to put our hands in the water. I was not sure if it would work, but I tried it. When I did, my hand looked like it belonged to a superhero! It was glowing bright blue. I hope someday I get to return to the Luminous Lagoon. The lights in the water were much more entertaining than the ones in the sky.

Problem:

audio

The Greek prefix dinos- means “whirling” and the Latin root word flagellum means “whip”. What does dinoflagellate most likely mean as it is used in the passage?

audio

the production of light from an organism’s body

audio

the study of creatures that live in the ocean

audio

to move around underwater water like a fish

audio

an organism with a whip-like part it uses to move around in the water

Cho 3 lớp như hình, viếtchương trình thực hiện các chức năng sau:
1.Nhập thông tin nngười(Person)gồm:nhân viên (Employee) và sinh viên(Student)
2.In ra 2 danh sách:Nhân viên, Sinh viên
3.In ra danh sách gồm các Nhân viên, Sinh viên được thưởng.Biết rằng:Nhân viên được thưởng nếu hireDay>25 Sinhviên được thưởng nếu mark>8
viết chương trình c++

Answers

Sorry I don’t know this language

¿Cuántos megabytes (MB) de capacidad tiene una memoria USB de 16 GB? el que me diga por que le doy una coronita

Answers

Answer:

16,384MB

Explanation:

1GB contiene 1024MB de capacidad. Si multiplicamos esto por 16 veemos que 16GB es igual a 16,384MB. Este seria el espacio exacto, aunque se dice que 1GB tiene 1000MB. Eso es por que la palabra Giga significa x1000 y el numero binario entero mas cercano a 1000 es 1024. Entonces los ingenieros usan este numero para representar la cantidad de espacio en un GB que tambien seria [tex]2^{10}[/tex]

If I drop or withdraw from all my courses after the term begins I must: Select one: a. Do nothing; the UoPeople will issue me an administrative withdrawal but it will count as a term of inactivity. b. Apply for a LOA by contacting my Program Advisor. c. Apply for a LOA in the Student Portal.

Answers

Answer:

If I drop or withdraw from all my courses after the term begins I must:

b. Apply for a LOA by contacting my Program Advisor.

Explanation:

Given the responsibilities of a Program Advisor in the college, it is important that any course withdrawal is obtained through her office.  She helps students to make a choice of a major and a minor, ensuring that all degree graduation requirements are fully met.  A student should be able to discuss her academic interests, goals, course planning, or even performance with the Program Advisor.  Applying for a Letter of Absence (LOA) should be done through her.

流火之詩II裏的團長叫"紅_"(20pts)(correct=brainliest)

Answers

Explanation:

倾尽天下—河图. 血染江山的画,怎敌你眉间一点朱砂

hope it is helpful to you

What is the most efficient way to control the type of information that is included in the .msg file when a user forwards a
contact to another user?
Use the "As an Outlook Contact option.
Create an additional contact with limited information.
o Use the Business Card option.
Create the contact using the XML format.

Answers

Answer: Use the "As an Outlook Contact option.

Explanation:

The most efficient way to control the type of information which will be included in the .msg file when a contact is forwarded to another user by a user is to use the Use the "As an Outlook Contact option.

After clicking on the contact that you want to forward it to, then click on forward, click on contact and click on As an Outlook Contact. You can then complete the email message, after which you'll click on send.

What new details are you able to see on the slide when the magnification is increased to 10x that you could not see at 4x? What about 40x?

Answers

Answer:

x=10

Explanation:

just need points because i can scan questions anymore

QUESTION 8
A weakness of PHP is that it only supports one database, MySQL.
True
False
QUESTION 9
All variable names in PHP are case-insensitive.
O True
False
QUESTION 10
An HTML form that is part of the PHP script that processes it is known as self-adhesive?
True
False

Answers

Answer:

question 8 is true

Explanation:

PHP is a server-side scripting language for creating dynamic web pages. ... The PHP programming language receives that request, makes a call to the MySQL database, obtains the requested information from the database, and then presents the requested information to your visitors through their web browsers.

For this activity, you will practice being both proactive and reactive to bugs. Both are necessary to get rid of errors in code.

Proactive:

Log in to REPL.it and open your Calculator program that you built in Unit 5.
In the index.js file, type and finish the following block of code that validates the input to make sure both are numbers (not letters or symbols):
try{
if (isNaN(…) || isNaN(…)){
throw …
}
else{
document.getElementById("answer").innerHTML = num1 + num2;
}
}
catch(e){
document.getElementById("answer")…
}

(Note: The || symbol is used in JavaScript to mean or . You can find this key to the left of the Z key if you’re using a PC or directly above the Enter key if you’re using a Mac.)
Add the finished code above to the correct place in your add() function. Make sure to delete this line since we moved it into the try block:
document.getElementById("answer").innerHTML = num1 + num2;
Paste the same code into the subtract() , multiply() , and divide() functions, making the necessary changes. Be careful with your divide() function since you already have an extra if else statement checking for a division by 0 mistake. (Hint: Cut and paste the entire if else statement inside the else block of your try statement.)
Test your program by typing in letters or symbols instead of numbers. Make sure you get the appropriate error message. (Note: The function is not supposed to check whether the text field is empty, only whether it contains non-numbers.)
When you are finished, share the link to your webpage with your teacher by clicking on the share button and copying the link.
Reactive:
The following Python program should print the sum of all the even numbers from 0 to 10 (inclusive), but it has two bugs:

x = 0
sum = 0
while x < 10:
sum = sum + x
x = x + 1
print(sum)
Complete a trace table and then write a sentence or two explaining what the errors are and how to fix them. You can choose whether to do the trace table by hand or on the computer. Turn in your trace table and explanation to your teacher.

Answers

Answer:

okk

Explanation:

mention 3 components that can be found at the back and front of the system unit​

Answers

Answer:

Back

Power port, USB port, Game port

Front

Power button, USB port, Audio outlet

Explanation:

There are several components that can be found on the system unit.

In most (if not all) computer system units, you will find more component at the back side than the front side.

Some of the components that can be found at the back are:

Ports for peripherals such as the keyboard, mouse, monitor, USB ports, power port, etc.

Some of the components that can be found at the back are:

The power button, cd rom, audio usb ports, several audio outlets, video port, parallel ports, etc.

Note that there are more components on the system units. The listed ones are just a fraction of the whole components

Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
coworker for immediate handling. What should she do?
O Configure a response for external senders,
O Configure a response for internal senders.
O Only send during a specific time range.
O Configure an Automatic Reply Rule.

Answers

Answer: Configure a response for external senders,

Explanation:

Based on the information that we have from the question, Kylee can configure a response for external senders, which will help in ensuring that when the client sends the email, it'll be forwarded to a coworker for immediate handling.

Therefore, based on the options given, the correct option is A

what is microsoft excel​

Answers

Answer:

A spreadsheet program included in Microsoft Office suit of application. Spreadsheets present tables of value arranged in rows and columns that can be manipulated mathematically using both basic and advanced functions.

Answer:

Microsoft Excel is a digital spreadsheets program developed by windows for various platforms. You can make graphs, pivot tables, calculators, and a macro programming language alled Visual Basic created for Applications.

To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue

Answers

Answer:

!(key == 'q')

Explanation:

Based on the description, the coded expression that would equate to this would be

!(key == 'q')

This piece of code basically states that "if key pressed is not equal to q", this is because the ! symbol represents "not" in programming. Meaning that whatever value the comparison outputs, it is swapped for the opposite. In this case, the user would press anything other than 'q' to continue, this would make the expression output False, but the ! operator makes it output True instead.

Write a program Ticket.py that will allow the user to enter actual speed
limit, the speed limit at which the offender was travelling, and the number
of previous tickets that person has received. The application should
calculate and display how many miles over the speed limit the offender
was travelling, the cost of the speeding ticket, and court cost. Use $10.00
as the amount to be charged for each mile per hour over the speed limit.
The court cost should be $50.00

Answers

Answer:

Following are the code to the given question:

def speedlimit():#defining a method speedlimit

a= int(input("Enter the offender's speed in mph: "))#defining a variable for input value

lim = int(input("Enter the speed limit in mph: "))#defining a variable for input value

n = int(input("The number of previous tickets that person has received: "))#defining a variable for input value

if (lim >= 20) and (lim < 70):#defining if block to check speed is between 20 to 70

if a > lim:#use if to check lim value greater than a

print("Driver was going", a-lim, "mph over the limit.")#print calculated value with message

print("The cost of the speeding ticket $",10*(a-lim))#print calculated value with message

else:

print( "Driver was going at a legal speed.")#print message

else:

print('Invalid speed limit.')#print calculated value with message

print("Court cost $",(50 + n*20))#print calculated value with message

speedlimit()

Output:

Please find the attached file.

Explanation:

In this code, a method "speedlimit" is declared that defines three variables that are "a, lim, and n" in which we input value from the user-end.

Inside the method, a nested conditional statement is used that checks the speed value is between 20 to 70 if it is true it will go to the next condition in which it checks lim value greater than a. It will use a print message that will print the calculated value with the message.

Use Python to: Combine the lists x, y, and z into one multi-dimensional array. Print the multi-dimensional array. Use the values within the multi-dimensional array to print this message:

THE SECRET LIES WITHIN.



#code start

x = ["N", "O", "H", "S"]

y = ["I", "R", "L", "T"]

z = ["C", "A", "W", "E"]

# Add code here.

( Note: a correct answer is needed as soon as possible. The due date is tomorrow )

Answers

Answer: ok I got tmdirn

Explanation:

1) It is possible to email a document
directly from the Word application.
O FALSE
O TRUE

Answers

Answer:

True

Explanation:

how we can richer interaction

Answers

A beneficial and pleasing user experience when operating an electronic device. In the future, rich interaction will be voice and speech recognition that actually recognizes anyone's spoken command and robotic devices that automatically assist people.

Write a method, findMax(), that takes in two integers and returns the largest value. Ex: If the program input is: 4 2 the method findMax() returns: 4 Note: Your program must define the method: public int findMax(int num1, int num2)

Answers

Answer:

public int findMax(int num1, int num2){

      if(num1 > num2){

           return num1;

      }

 

      else {

          return num2;

      }

}

Explanation:

The code has been written in Java and the following explains every part of the code.

i. Start with the method header:

public int findMax(int num1, int num2)

ii. Followed by a pair of curly braces representing the block for the method.

public int findMax(int num1, int num2){

   

}

iii. Within the block, write the statements to find out which is greater between num1 and num2

This is done with an if..else statement. To check if num1 is greater than num2, write the following within the block.

if(num1 > num2){

   return num1;

}

else {

 return num2;

}

The if block tests if num1 is greater than num2. If it is, then num1 will be returned.

The else block is executed only if num1 is not greater than num2. In this case, num2 will be returned since it is greater.

iv. Put all together

public int findMax(int num1, int num2){

   if(num1 > num2){

       return num1;

   }

  else {

      return num2;

   }

}

The following method is intended to return true if and only if the parameter val is a multiple of 4 but is not a multiple of 100 unless it is also a multiple of 400. The method does not always work correctly public boolean isLeapYear(int val) if ((val 4) == 0) return true; else return (val & 400) == 0; Which of the following method calls will return an incorrect response?
A .isLeapYear (1900)
B. isLeapYear (1984)
C. isLeapYear (2000)
D. isLeapYear (2001)
E. isLeapYear (2010)

Answers

Answer:

.isLeapYear (1900) will return an incorrect response

Explanation:

Given

The above method

Required

Which method call will give an incorrect response

(a) will return an incorrect response because 1900 is not a leap year.

When a year is divisible by 4, there are further checks to do before such year can be confirmed to be a leap year or not.

Since the method only checks for divisibility of 4, then it will return an incorrect response for years (e.g. 1900) that will pass the first check but will eventually fail further checks.

Hence, (a) answers the question;

why stress testing is needed?​

Answers

Answer:

To be able to test a product if it can withstand what it is supposed to before being released to the public for saftey reasons.

Answer:

Stress testing involves testing beyond normal operational capacity, often to a breaking point, to observe the results. Reasons can include:

Helps to determine breaking points or safe usage limits Helps to confirm mathematical model is accurate enough in predicting breaking points or safe usage limits Helps to confirm intended specifications are being met Helps to determine modes of failure (how exactly a system fails) Helps to test stable operation of a part or system outside standard usage Helps to determine the stability of the software.

Stress testing, in general, should put computer hardware under exaggerated levels of stress to ensure stability when used in a normal environment.

tools used to type text on Ms paint​

Answers

this is ur answer hope this answer will help u


What is the use of Name Box in MS-Excel?

Answers

nb n nknknububjnkojbin

Answer:

To be able to set a variable or set value for a specific box or collum of boxes.

Discuss at least 1 Microsoft Windows security features that could protect data?

Answers

Answer:

Virus & threat protection.

Explanation:

Monitor threats to your device, run scans, and get updates to help detect the latest threats.

One Microsoft Windows security feature that can help protect data is BitLocker Drive Encryption.

BitLocker is a full-disk encryption feature available in certain editions of Microsoft Windows, such as Windows 10 Pro and Enterprise. It provides protection for data stored on the system's hard drives or other storage devices.

By encrypting the entire drive, BitLocker helps safeguard the data against unauthorized access or theft, even if the physical drive is removed from the device. It uses strong encryption algorithms to convert the data into an unreadable format, ensuring that only authorized users with the appropriate encryption key or password can access and decrypt the data.

BitLocker also provides additional security features, such as pre-boot authentication, which requires users to enter a password or use a USB key to unlock the drive before the operating system loads. This prevents unauthorized users from accessing the encrypted data, even if they have physical access to the device.

Overall, BitLocker Drive Encryption is a powerful security feature in Microsoft Windows that can effectively protect data by encrypting entire drives and adding layers of authentication and protection against unauthorized access.

Learn more about Security here:

https://brainly.com/question/13105042

#SPJ6

what is the best motivation that you can do/give to make your employees stay? ​

Answers

i'd give fringe benefits to them every month

Explanation:

to encourage them to work on the mission statement and the business goal

Other Questions
Please answer properly. Capital budgeting analysis not only requires the evaluation of cash flows but also requires the understanding of the origin of those cash flows. Based on your understanding of cash flows in a firm, complete and answer the following questions The present value of ___________ can be used to determine the basis of a firm's value. Ideally, capital budgeting analysis should take cash flows into account ___________Understanding the nature of projects Capital budgeting analysis often involves decisions related to expansion projects and/or replacement projects. Based on your understanding of expansion and replacement projects, complete the following: If a clothing store opens a second retal location on the other side of town, this project would be considered__________ project. What are sunk costs? Acme Manufacturing owns a warehouse that it is not currently using. It could sell the warehouse for $300,000 or use the warehouse in a new project. Should Acme Manufacturing include the value of the warehouse as part of the in investment in the new project or treat the value of the warehouse as a sunk cost? Yes, include the value of the warehouse as part of the initial investment in the new project No, treat the value of the warehouse as a sunk cost The role of externalities A paper manufacturer has built a plant that meets all government-mandated environmental regulations, but the pl sant odor when it is being operated. Many residents in the area dislike the paper mill because of these unpleasant odors. This is an example of ________externality. C) 6I3)4)12x + 1213x + 5A) -C) -10A) 6C) 7B) 8D) 95)6) what is the area of this rectangle? hi! can someone help with this question? "Why is the nitrogen cycle essential to plant and animal life?" India's caste system made sure that people Please show ur work too!(Image is the whole problem) angName two vertical angles, two supplementaryangles in the diagram below. Pls help Ill give crown f r e e points bc why not :) Write equation for the line that is parallel to the x axis and passing through (3,2) A farm categorizes its chickens into 3 classes according to the weight: small, medium, andbig. For any chicken in this farm, the distribution of the weight (denoted byW) follows a GaussianPDF with mean 3.8 lb and standard deviation 0.6 lb. The categories follow the following rulesmall: W A presin de 3atm, 7L de un gas a temperatura constante experimenta un cambio ocupando un volumen de 0,5L Cul ser la presin que ejerce? ayuda Select the form of diversity that is best described by the following example. After working with his team for a while, Patrick realizes that his team is more diverse than he initially thought. The members come from a variety of functional backgrounds and have a wide variety of work experiences. Variety diversity Separation diversity Disparity diversity Deep-level diversity i tng nghin cu hnh vi t chc l ai which is the first political party of nepa Find the missing side Select the correct answer.A school bus has 25 seats, with 5 rows of 5 seats. 15 students from the first grade and 5 students from the second grade travel in the bus. Howmany ways can the students be seated if all of the second-grade students occupy the first row?OA 25P20OB. SPs * 20P15OC5C525C14OD. SPs *15P15OE PSX25C5 1: A qu hora comienza el festival?A: Ala una de la maana.B: Ninguna de las anterioresC: Alas doce del medio da.D; A las once de la maana.2: Las siguientes son todas actividades que ocurren durante el da de la celebracin, excepto?A: concursos de Paella B: bailes C: corrida de toros D: desfiles E: msica Which statement about blomes is true?A. Different blomes share similar plants and wildlife.B. Each blome has only one ecosystem.C. There are only three blomes on the Earth.D. Blomes are determined by climate zones.