Full question:
#Write a function called align_right. align_right should #take two parameters: a string (a_string) and an integer #(string_length), in that order. # #The function should return the same string with spaces #added to the left so that the text is "right aligned" in a #string. The number of spaces added should make the total #string length equal string_length. # #For example: align_right("CS1301", 10) would return the #string " CS1301". Four spaces are added to the left so #"CS1301" is right-aligned and the total string length is #10. # #HINT: Remember, len(a_string) will give you the number of #characters currently in a_string.
Answer and Explanation:
Comments have been used in the code to explain the program
Using Python
#first define the function with #parameters a_string and string_length
def align_right(ourString,stringLength):
#test to see if string is longer than the length passed
if len(ourString) > stringLength:
print(ourString)
#If not define variable aligned and use #rjust function to justify string to the #left leaving space left in stringLength
else:
aligned=ourString.rjust(stringLength)
#print the variable aligned
print(aligned)
#Call function align_right
align_right("jelly", 15)
Explain the purpose of the open() and close() operations.
Answer:
The open() operation notifies the system that the named file is about to become active. The close() operation notifies the system that the named file is no longer in active use by the user who issued the close operation.
g Add a throw statement to the processNumbers function that throws the message "An element in the list is not a number." if one of the elements in toProcess is not a number. Hint: The function isNaN() returns true if the parameter is not a number.
Answer and Explanation:
function processNumbers(alist){
var Ourarray= new array(alist);
Ourarray.foreach(
if(isNaN()){
Console.log( "An element in the list is not a number."};
break;
}
}
processNumbers(alist)
From the above, we have defined a function that takes an array parameter(the following array variable will make sure of that). We test each element in the array using foreach array function. The for each function runs the if statement and if isNan is true for each of the elements in the array.
Write a program named lastname_firstname_cities.py that works with information about large cities. Your program will open the cities.txt downloadfile. Each line in the file has the name of a city, its country, and its population. The first few lines of the file look like this:
Answer and Explanation:
Open your text editor and open new file. Save new file file as lastname_firstname_cities.py. The program will open the file cities.txt downloadfile hence :
dfile= open(cities.txt, "r")
If we write this into our lastname_firstname_cities.py file it will open our cities.txt downloadfile in read mode and text mode(by default unless we specify binary mode which is for images)
Type the correct answer in the box. Spell all words correctly.
Which testing requires coding the test cases into a scripting language?
testing requires coding the test cases into a scripting language.
Answer:
sorry I forgot it
Explanation:
because I am now in a last position
can somebody help what's wrong with this code
asap~
Answer:
There's a + missing to concatenate your variable to your string.
Instructions
Create a multimedia project that contains the text element and all the contents that you have studied about that element
Answer:
iiiio888887776558777u765
who is considered as the father of computer science?
Charles Babbage is known as father of computer science because he designed the original programmable computer .
I hope it helps and if you want to have good answer follow me, I will be your second sight on your any problems♥️♥️
Chất xơ có nhiều trong thực phẩm nào?
Answer: rau củ quả đều có lượng chất xơ nhiều hơn so với các loại thực phẩn khác
Explanation:
list two ways to insert a chart in powerpoint
Answer:
1st way: On the Insert tab, in the Illustrations group, click Chart. In the Insert Chart dialog box, click a chart, and then click OK.
2nd way: Click INSERT > Chart. Click the chart type and then double-click the chart you want.
3. Coaxial/telephone cable sends
during the data transmission
signal
Answer:
high frequency signal.
A computer has many resources. A resource can be memory, disk drive, network bandwidth, battery power, or a monitor. It can also be system objects such as shared memory or a linked list data structure. This principle is based in object-oriented programming (OOP). In OOP, a class definition encapsulates all data and functions to operate on the data. The only way to access a resource is through the provided interface. Which security principle are we referring to
Answer:
The security principle being referred to here is:
Resource Encapsulation.
Explanation:
Resource Encapsulation is one of the cybersecurity first principles. It allows access or manipulation of the class data as intended by the designer. The cybersecurity first principles are the basic or foundational propositions that define the qualities of a system that can contribute to cybersecurity. Other cybersecurity first principles, which are applied during system design, include domain separation, process isolation, modularization, abstraction, least principle, layering, data hiding, simplicity, and minimization.
Which of the following BEST describes an inside attacker?
An agent who uses their technical knowledge to bypass security.
An attacker with lots of resources and money at their disposal.
A good guy who tries to help a company see their vulnerabilities.
An unintentional threat actor. This is the most common threat.
The inside attacker should be a non-intentional threat actor that represents the most common threat.
The following information related to the inside attacker is:
It is introduced by the internal user that have authorization for using the system i.e. attacked.It could be intentional or an accidental.So it can be non-intentional threat.Therefore we can conclude that The inside attacker should be a non-intentional threat actor that represents the most common threat.
Learn more about the threat here: brainly.com/question/3275422
Alexis received an email message from an unknown sender that included an attachment.
If she opens the attachment, what kind of malicious software might be activated, and what are the consequences?
Opening the attachment would release a worm, which would infect her system with a virus.
Opening the attachment would release a worm, which would infect her system with spyware.
Opening the attachment would release an active worm, which would infect her system with adware.
Opening the attachment would release a passive worm, which would infect her system with adware.
Answer:
Opening the attachment would release a worm, which would infect her system with a virus.
Answer: B. Opening the attachment would release a worm, which would infect her system with a virus.
consider l= 5 ,r= 11. you must determine the sum of the values of the function in the range L to R . you have to calculate sum = lrf(x) in python coding
def summation (num1, num2):
i = 0
for x in range (num1 : num2 + 1):
i += x
return i
print ( summation(l, r))
T
N
O
?
You can insert only the row
only to
True or false
false
Explanation:
good luck bro
have a great day
Answer:
false
Explanation:
what is IBM 1401 used for? Write your opinion.
Explanation:
The 1401 was a “stored program computer,” allowing programmers to write (and share) applications loaded into the machine from punched cards or magnetic tape, all without the need to physically reconfigure the machine for each task.
3. Which property is used to select full Row of data grid view
a) Select Mode b) Mode Selection c) Selection Mode d) Mode Select
Answer:
I think a is correct answer.
Write the following numbers in binary. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 46. 55. 61.
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (current_price * 0.051) / 12. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))
Answer:
The program in Python is as follows:
current_price = int(input("Current Price: "))
last_price = int(input("Last Month Price: "))
change = current_price - last_price
mortgage = (current_price * 0.051) / 12
print('Change: {:.2f} '.format(change))
print('Mortgage: {:.2f}'.format(mortgage))
Explanation:
This gets input for current price
current_price = int(input("Current Price: "))
This gets input for last month price
last_price = int(input("Last Month Price: "))
This calculates the price change
change = current_price - last_price
This calculates the mortgage
mortgage = (current_price * 0.051) / 12
This prints the calculated change
print('Change: {:.2f} '.format(change))
This prints the calculated monthly mortgage
print('Mortgage: {:.2f}'.format(mortgage))
Answer:
current_price = int(input())
last_months_price = int(input())
change = current_price - last_months_price
mortgage = current_price * 0.051 / 12
print('This house is $', end= '')
print(current_price, end= '. ')
print('The change is $', end= '')
print(change, end= ' ')
print('since last month.')
print('The estimated monthly mortgage is $', end= '')
print(mortgage, end='0.\n')
I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?
a. hard drive is full
b. photos were taken in a different country
c. USB port is broken
d. the file structure of the 2 hard drives are not compatible
The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.
The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.
Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:
JPEGPNGJFIFAny external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.
The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false
Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:
"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.
For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults
Why are data silos problematic?
Answer:
Hampers collaboration
Resource wastage
Lack of data integrity
Explanation:
Data silos comes into play When different departments of an orgainiziations independently collects data needed for its operations. The finance, HR, administrative departments and so on collects their data and keeps it to themselves. As a result there is a repetitive and needless gathering and storage of already existing data, that is the data required by one group will have to be gathered again while it currently exists with another group. This leads to inefficient resource management and wastage. This practice also leads to data integrity as data stored differently across departments becomes inconsistent and less accurate over time. Team work and collaboration is gradually eroded as each group continues to hold on to its resources which poses a problem towards organizational growth.
Select the scenario that describes a top-down approach to data warehouse design.
Cathy’s Cards and Gifts, which has three stores, creates data marts for its sales, marketing, and delivery departments to study the possibility of establishing a new store.
Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
Cynthia’s Florals, which is dealing with debt, creates new data marts for the service, delivery, and sales departments to develop a strategy to stay in business.
Connor’s Meat Market, which just opened, creates data marts to track the sale of each of the following meats: beef, pork, lamb, and fish.
Answer:
Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
The scenario defines a top-down approach to data warehouse design as "Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed".
What is a top-down approach to data warehouse design?In the "Top-Down" method system, a data warehouse exists defined as a subject-oriented, time-variant, non-volatile, and integrated data storage for the entire business data from various sources exist validated, reformatted, and saved in a normalized (up to 3NF) database as the data warehouse.
Therefore, the correct answer is option b) Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
To learn more about warehouse design
https://brainly.com/question/25885061
#SPJ2
What are the benefits of using LinkedIn Sales Navigator?
Answer:
Well, there are a number of advantages that come with this advanced LinkedIn automation tool. Here are some of the top benefits of a Sales Navigator:
1. Can find and export up to 5000 prospects at a time.
2. Enables you to send 30 InMails per month
3. Easy access Teamlink -enabling you to expand your network by pooling connections
4. Integrate with existing systems
Write a C program that will load entries from a file containing details of books and prints them.
Program Requirements:
a. Load file containing details of books
b. Print out all the books Required approach:
1. Design a struct/class that can hold the details of an individual book.
2. Dynamically allocate an array of these objects. The size should be the number of book entries from the input file given by the user.
3. Load all of the book entries into this array of objects before printing
Answer:
........
Explanation:
Differentiate between TCP Reno and TCP Tahoe.
Answer:
They have different words
Explanation:
I hope it helps choose me the brainest
What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it
Answer:
Restart
Explanation:
Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.
5 Major of computer application
Answer:
Basic Applications of Computer
1 ) Home. Computers are used at homes for several purposes like online bill payment, watching movies or shows at home, home tutoring, social media access, playing games, internet access, etc.
2 ) Medical Field.
3 ) Entertainment.
4 ) Industry.
5 ) Education.
Explanation:
Hope it helps you
Mark my answer as brainlist
have a good day
A good machine should have the mechanical advantage of......?
Answer:
The ideal mechanical advantage (IMA) of an inclined plane is the length of the incline divided by the vertical rise, the so-called run-to-rise ratio. The mechanical advantage increases as the slope of the incline decreases, but then the load will have to be moved a greater distance.
Explanation:
e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}
Explanation:
double e-d/5.6;is wrong it should return to c
Select the correct statement(s) regarding IP addressing.
a. IPv4 and IPv6 addressing is fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet.
c. Subnet masks are used with both class and classless IP addresses.
d. all statements are correct.
Subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.
What is an IP address?A device on the internet or a local network may be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as “Internet Protocol,” or IP.
Only C is correct, rest other statements are incorrect because:
a. IPv4 and IPv6 addressing is fully compatible with one another is incorrect. While IPv4 and IPv6 can coexist on the same network, they are not fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet is incorrect. Classless Inter-Domain Routing (CIDR) is a technique used to allocate IP addresses more efficiently.
Therefore, subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.
Learn more about, here
https://brainly.com/question/3805118
#SPJ6