#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.

Answers

Answer 1

Answer:

This program is written using Python Programming Language;

Comments are not used; however, see explanation section for detailed line by line explanation

See Attachment

Program starts here

def align_right(a_string,string_length):

     if len(a_string) > string_length:

           print(a_string)

     else:

           aligned=a_string.rjust(string_length)

           print(aligned)

   

a_string = input("Enter a string: ")

string_length = int(input("Enter string length: "))

align_right(a_string,string_length)

Explanation:

Function align_right is declared using on line

def align_right(a_string,string_length):

This line checks if the length of the current string is greater than the input length

     if len(a_string) > string_length:

If the above condition is true, the input string is printed as inputted

           print(a_string)

If otherwise,

     else:

The string is right justified using the next line

           aligned=a_string.rjust(string_length)

The aligned string is printed using the next line

           print(aligned)

   

The main function starts here

This line prompts user for a string

a_string = input("Enter a string: ")

This line prompts user for total string length

string_length = int(input("Enter string length: "))

This line calls the defined function

align_right(a_string,string_length)

#Write A Function Called Align_right. Align_right Should #take Two Parameters: A String (a_string) And

Related Questions

Do transformers have life insurance or car insurance? If you chose life insurance, are they even alive?

Answers

Answer:

Car insurance

Explanation:

they are machines with ai

C++ PROGRAM THAT DOES THE FOLLOWING:
Problem You Need to Solve for This Lab:
You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should save the data back to the same data file when the program exits.
What Your Program Should Do:
Write an interactive text based menu interface (using a loop) that will allow the user to
 Enter information for a new song
 Display information for all the songs in the database with index for each song
 Remove a song by index
 Search for songs by a certain artist
 Search for songs by a certain album
 Quit

Answers

Answer:

I have updated answer in google

Explanation:

please chek it. I hope it will nice

What would be suggested way to share and sustain knowledge with members in a team ?
A) Sharing of best practices and lessons learnt through emails
B) Sharing knowledge through knowledge sharing sessions
C) Sharing knowledge through informal conversations, for example, during lunch breaks.
D) Sharing best practices, lessons learnt and other topics in a central place where team can collaborate

Answers

Answer: D) Sharing best practices, lessons learned and other topics in a central place where the team can collaborate

Explanation: Knowledge sharing within a team is usually an important aspect of building a strong and efficient team. Acquiring knowledge usually comes from the experience gathered from previous projects, learning, or tips learned from various sources. Therefore, sharing knowledge is always a good way to ensure that what is gained is sustained by letting others know. Sharing and sustaining knowledge is most effective when transmitted or aired to a group of people usually a team gathered in an interactive setting which allows members to freely share experience and get feedback, views, or thoughts from other collaborators.

What is the difference between requirements and controls in the security process? Give examples of each.

Answers

Answer:

Security controls are those measures taken to prevent, identify, counteract, and reduce security risks to computer systems, whereas, Security Requirements are guidelines or frameworks that stipulates measures to ensure security control.

Explanation:

Security controls encompass all the proactive measures taken to prevent a breach of the computer system by attackers. Security requirements are those security principles that need to be attained by a system before it can be certified as safe to use.

Security controls are of three types namely, management, operational, and technical controls. Examples of technical controls are firewalls and user authentication systems. A statement like 'The system shall apply load balancing', is a security requirement with an emphasis on availability.

Your smartphone, digital camera, and printer are all part of a network in your workspace. What type of network is likely in use

Answers

Answer:

PAN

Explanation:

PAN, short form of Personal Area Network, is a type of computer network built for personal use typically within a building. This could be inside a small office or a bedroom in a residence. This type of network basically consists of one or more personal computers, digital camera, printer, Tv, scanner, telephones, peripheral devices, video games console, and other similar devices.

It is pretty much simple to set up and allow for great flexibility. In this network, a single modem can be set up to enable both wired and wireless connections for multiple devices within the building.

cal address EtherAddr. What would happen if, when you manually added an entry, you entered the correct IP address, but the wrong Ethernet address for that remote interface

Answers

The arp command allows users to download and edit the Address Resolution Protocol cache.Whenever time a laptop's TCP/IP stack utilizes ARP to determine its Multimedia Access Control address after an IP address, it records the mappings in the ARP cache because the future ARP iterators proceed quicker.In this, when the Router removes the IP address from the Ethernet frame after receiving the destination IP address & uses ARP to determine the destination MAC address.The information is sent to the ethernet address; IP is on a higher layer, therefore this would be lost before the user stored their layer.That's why the solution in "all information would be lost".

Learn more:

brainly.com/question/7342246

The Address Resolution Protocol ARP cache maintained by ARP keeps a record of IP addresses and their corresponding Media Access Control, MAC address

The correct response to what would happen if the wrong EtherAddr is

entered into the arp-s InetAddr EtherAddr command is that;

The system will not be able to connect to the IP address linked to the wrong Ethernet address.

The reason the above response is correct is as follows:

Characteristics of the ARP protocol;

The ARP protocol is a protocol that has a high level of control such that

the reply is trusted and can be used to redirect traffic through spoofing of

the responses to ARP which are then stored in the cache.

Functioning of the arp -s InetAddr EtherAddr command;

The command arp -s InetAddr EtherAddr command inputs a manual entry

into the ARP cache that works to assign the inputted IP address in InetAddr

to the MAC physical address in EtherAddr.

The ARP provides the translation from physical MAC addresses of Layer 2

to  the IP address of Layer 3 by mapping the MAC address to the IP

address.

Solution:

What would happen if, when you manually added an entry, you entered the correct IP address, but the wrong Ethernet address for that remote interface is as follows;

When the wrong Ethernet address is entered in the arp -s command, the

IP-address is resolved as belonging to the wrong Ethernet  or MAC

address, and if the address does not exist, it will not be possible to

connect to the correct or desired IP address.

Learn more about ARP here:

https://brainly.com/question/13068535

https://brainly.com/question/22696379

https://brainly.com/question/12975431

The advantage of returning a structure type from a function when compared to returning a fundamental type is that

Answers

Answer:

The function can return multiple values and the function can return an object

Explanation:

The advantage of returning a structure type from a function when compared to returning a fundamental type is that the function can return multiple values and also the function can return an object

A function in a structure can be passed to a function from any other function or from the main function itself and the definition of a structure can be seen in the function where it is found

A technician is evaluating malware that was found on the enterprise network. After reviewing samples of the malware binaries, the technician finds each has a different hash associated with it. Which of the following types of malware is MOST likely present in the environment?

a. Trojan
b. Polymorphic worm
c. Rootkit
d. Logic bomb
e. Armored virus

Answers

Answer:

(b) polymorphic worm

Explanation:

A polymorphic worm can be compared with a chameleon. It changes its color so as to blend with the background of the surrounding to avoid being seen or caught. A polymorphic worm is a special type of worm that keeps changing its constituent features in order to avoid being detected. The most common way in which polymorphic worms hide their codes is by using encryption.

Polymorphic worms have two parts: the part that changes and the one that does not change. The part that changes include the characteristics of the worm such as encryption key, associated hash value e.t.c. The part that does not change is basically its functionality. Therefore, although the characteristics of the worm keep changing, its overall function remains the same.

A security analyst is performing a BIA. The analyst notes that in a disaster, failover systems must be up and running within 30 minutes. The failover systems must use back up data that is no older than one hour. Which of the following should the analyst include in the business continuity plan?
A. A maximum MTTR of 30 minutes
B. A maximum MTBF of 30 minutes
C. A maximum RTO of 60 minutes
D. An SLA guarantee of 60 minutes

Answers

Answer:

D.  A maximum RPO of 60 minutes

Explanation:

Note that an option is not included in this list of options.

The complete list of options is:

A. A maximum MTTR of 30 minutes

B. A maximum MTBF of 30 minutes

C. A maximum RTO of 60 minutes

D.  A maximum RPO of 60 minutes

E. An SLA guarantee of 60 minutes

The Recovery Point Objective tells how old a backup file must be before it can be  recovered by a system after failure.

Since the data in the failover systems described in this question must be backup and recovered after the failure, it will be important to include the Recovery Point Objective (RPO) in the Business Continuity Plan.

Since the failover systems must use back up data that is no older than one hour, the backup of the system data must be done at intervals of 60 minutes or less. Meaning that the maximum RPO is 60 minutes.

Note that RPO is more critical than RTO in data backup

C++ 3.4.4: If-else statement: Print senior citizen. Write an if-else statement that checks patronAge. If 55 or greater, print "Senior citizen", otherwise print "Not senior citizen" (without quotes). End with newline.

Answers

Answer:

#include <iostream>

using namespace std;

int main()

{

   int patronAge = 71;

   

   if(patronAge >=55)

       cout<<"Senior citizen"<<endl;

   else

       cout<<"Not senior citizen"<<endl;

   return 0;

}

Explanation:

Initialize the patronAge age, in this case set it to 71

Check the patronAge. If it is greater than or equal to print "Senior citizen". Otherwise, print "Not senior citizen". Use "endl" at the end of each print statement to have new lines.

Write a program named Deviations.java that creates an array with the deviations from average of another array. The main() method

Answers

Answer:

hello your question is incomplete attached is the complete question and solution

answer : The solution is attached below

Explanation:

Below is a program named Derivations.java that creates an array with the deviations from average of another array.

Makers of tablet computers continually work within narrow constraints on cost, power consumption, weight, and battery life. Describe what you feel would be the perfect tablet computer. How large would the screen be? Would you rather have a longer-lasting battery, even if it means having a heavier unit? How heavy would be too heavy? Would you rather have low cost or fast performance Should the battery be consumer-replaceable?

Answers

Answer:

In my opinion I would spend my money on a pc, tablets are of no use anymore besides having a larger screen, nowadays you either have a phone or a computer.

In my opinion I would spend my money on a pc, tablets are of no use anymore besides having a larger screen, nowadays you either have a phone or a computer.

What will be the typical runtime of a tablet?

The typical runtime of a tablet is between three and ten hours. More charge is typically needed for less expensive models than for more expensive tablets.

The typical runtime of a tablet is between three and ten hours. More charge is typically needed for less expensive models than for more expensive tablets. It might go a week or longer between charges if you only use the tablet once or twice each day.

Many people find that charging merely 80% is ineffective. Your phone won't function if you fully charge it and then use it in a single day. The 40-80% rule applies if, like me, your daily usage is limited to 25–50%.

The typical runtime of a tablet is between three and ten hours. More charge is typically needed for less expensive models than for more expensive tablets.                          

Therefore, In my opinion I would spend my money on a pc, tablets are of no use anymore besides having a larger screen, nowadays you either have a phone or a computer.

Learn more about battery on:

https://brainly.com/question/19225854

#SPJ2

A customer contacts the help disk stating a laptop does not remain charged for more than 30 minutes and will not charge more than 15%. Which of the following components are the MOST likely causes the issue? (Select three.) A. LCD power inverter B. AC adapter C. Battery D. Processor E. VGA card F. Motherboard G. Backlit keyboard H. Wireless antenna

Answers

Answer:

A. LCD power inverter

B. AC adapter

C. Battery

ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed frequency bands.

a. True
b. False

Answers

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.

When preparing a photo for a magazine, a graphic designer would most likely need to use a program such as Microsoft Excel to keep track of magazine sales. Microsoft Word to write an article about the photo. Adobe Photoshop to manipulate the photo. Autodesk Maya to create 3-D images that match the photo.

Answers

Answer:

Adobe Photoshop To Manipulate The Photo.

Explanation:

BLACKPINKS new album is amazing OMG I LOVE Lovesick Girls!!!

Can Someone Help
Please Show Work​

Answers

Answer:

1) 1/14

2) 1/7

Explanation:

Summer Vacation

Number of times letters listed

S 1

U 1

M 2

E 1

R 1

V 1

A 2

C 1

T 1

I 1

O 1

N 1

Probability= Successful outcome ÷ Possible outcome.

Successful outcome(C)=1

*Successful outcome(M)=2

Successful outcome refers to letters chosen.

*Possible outcome=14

*Possible outcome refers to total number of letters.

Probability of C =1/14

Probability of M= 2/14=1/7

Hope this helps ;) ❤❤❤

Let me know if there is an error in my answer.

Megan was working on an image for a presentation. She had to edit the image to get the style she wanted. Below is the original picture and her final picture. Which best describes how she edited her picture? She cropped the blue background and added contrast corrections. She removed the complex blue background and added contrast corrections. She cropped the blue background and added artistic effects. She removed the complex blue background and added artistic effects.

Answers

Answer:

She removed the complex blue background and added artistic effects.

Explanation:

This is the best answer because both aspects are correct. If Megan were to "Crop" the backgrounds the shape would have changed and she would not have been able to get the whole background without cropping some of the flowers out. Therefore it is not A or C. The pictured change is most definitely artistic effects. So D is the best option.

Answer:

She removed the complex blue background and added artistic effects.

Explanation:

on edg

The main path of the Internet along which data travels the fastest is known as the Internet ________. Group of answer choices

Answers

Answer:

Internet backbone

Explanation:

The internet backbone is made up of multiple networks from multiple users. It is the central data route between interconnected computer networks and core routers of the Internet on the large scale. This backbone does not have a unique central control or policies, and is hosted by big government, research and academic institutes, commercial organisations etc. Although it is governed by the principle of settlement-free peering, in which providers privately negotiate interconnection agreements, moves have been made to ensure that no particular internet backbone provider grows too large as to dominate the backbone market.

A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
1. True
2. False

Answers

Answer:

true

Explanation:

What's the value of this Python expression? ((10 >= 5*2) and (10 <= 5*2))

Answers

Answer:

1 (true)

Explanation:

10 == 10 is valid=> 10 >= 10 is valid => 10 >=(5*2) is valid

10 == 10 is valid=> 10 <= 10 is valid => 10 <=(5*2) is valid

=>  ((10 >= 5*2) and (10 <= 5*2)) is valid => Return 1 or True

Problem You Need to Solve for This Lab:

You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should save the data back to the same data file when the program exits.

What Your Program Should Do:

Write an interactive text based menu interface (using a loop) that will allow the user to

ï‚· Enter information for a new song

ï‚· Display information for all the songs in the database with index for each song

ï‚· Remove a song by index

ï‚· Search for songs by a certain artist

ï‚· Search for songs by a certain album

ï‚· Quit

For each song, you need to keep track of:

title

artist

duration

album

Allow the program to keep looping until user wants to quit. When the program starts, it should load the tasks from external file ("songs.txt") into memory. When user enters information about the new song, the program needs to read them in, save them in memory and eventually write them to the external data file ("songs.txt"). The file format could look like:

Stereo Hearts;Gym Class Heroes;3;34;The Papercut Chronicles II
Counting Stars;OneRepulic;4;17;Native
The ';' is used as a delimiter or field separator. Each record ends with a new line character.

Some Implementation Requirements:

Write at least four functions WITH arguments for this assignment.

Use struct named Song to model each song

Use array of structs to model the collection of songs.

Hint: In this assignment, some data fields may have multiple words in it. Therefore,

you now SHOULD read using the 3 argument version of get.

Watch out. When using the 3 argument version of get you need to make sure to

remove the delimiter or newline. Therefore, anytime you read (even a confirmation

message), make sure to eat the newline using cin.ignore(...)!

Make sure to have a delimiter written between each item in the file – like a newline.

This will be important when you read the information back from the file.

For submission, your data file should contain a sufficient set of test data. It should have test cases for same artist with multiple songs and same album with multiple songs in it.

Do-Not List:

No Global Variables (you can have global constants)

Do not use Classes or Linked Lists

You must use cstring and char arrays. (do not use )

No use of the stdio library (use iostream and fstream)

Instead of the string class, you will be using arrays of characters and the cstring library

No STL containers such as vector. You must implement your own array for this class.

Answers

Answer:

Write questions properly

Explanation:

Then it is easy to say answer

Write down the information for your system’s active network connection (most likely either Ethernet or Wi-Fi).

Answers

Question:

1. Open a command prompt window, type ipconfig/ all and press Enter.

2. Write down the information for your system’s active network connection(most likely either Ethernet or Wi-Fi).

* Physical address in paired hexadecimal form.

* Physical address expressed in binary form.

Answer:

00000000 11111111 00000011 10111110 10001100 11011010

Explanation:

(i)First, open a command prompt window by using the shortcut: Windows key + X then select command prompt in the list.

(ii)Now type ipconfig/ all and press Enter. This will return a few information

(a) To get the Physical address in paired hexadecimal form, copy any of the Physical Addresses shown. E.g

00-FF-03-BE-8C-DA

This is the hexadecimal form of the physical address.

(b) Now let's convert the physical address into its binary form as follows;

To convert to binary from hexadecimal, we can use the following table;

Hex                 |         Decimal                |           Binary

0                      |          0                           |           0000

1                       |          1                            |           0001

2                      |          2                           |           0010

3                      |          3                           |           0011

4                      |          4                           |           0100

5                      |          5                           |           0101

6                      |          6                           |           0110

7                      |          7                           |           0111

8                      |          8                           |           1000

9                      |          9                           |           1001

A                     |          10                           |           1010

B                      |          11                           |           1011

C                      |          12                           |           1100

D                      |          13                           |           1101

E                      |          14                           |           1110

F                      |          15                           |           1111

Now, from the table;

0 = 0000

0 = 0000

F = 1111

F = 1111

0 = 0000

3 = 0011

B = 1011

E = 1110

8 = 1000

C = 1100

D = 1101

A = 1010

Put together, 00-FF-03-BE-8C-DA becomes;

00000000 11111111 00000011 10111110 10001100 11011010

PS: Please make sure there is a space between ipconfig/ and all

Suppose you are provided with 2 strings to your program. Your task is to join the strings together so you get a single string with a space between the 2 original strings. This is a common case is coding and you will need to create your output by joining the inputs and adding the space in the middle.

# Input from the command line
import sys
string1 = sys.argv[1]
string2 = sys.argv[2]

Answers

Answer:

public class TestImport{

   public static void main(String[] args) {

       String string1 = args[1];

       String string2 = args[2];

       System.out.println(string1 +" " +string2);

   }

}

Explanation:

The solution here is to use string concatenation as has been used in this statement System.out.println(string1 +" " +string2);

When this code is run from the command line and passed atleast three command line arguments for index 0,1,2 respectively, the print statment will return the second string (that is index1) and the third argument(that is index2) with a space in-between the two string.

.Pretend you are ready to buy a new computer for personal use.First, take a look at ads from various magazines and newspapers and list terms you don’t quite understand. Look up these terms and give a brief written explanation. Decide what factors are important in your decision as to which computer to buy and list them. After you select the system you would like to buy, identify which terms refer to hardware and which refer to software.

Answers

Answer:

Brainly is not meant to give paragraph answers to large questions.

In a computer (desktop)

There are 8-9 main components to a PC

Motherboard

CPU

GPU (for gamers)

RAM

SSD

HDD

PSU

Cooling fans (for AMD processors stock fans are included)

Case (some fans included)

I personally build my computers (desktops) as its cheaper and I won't have to pay a build fee.

What are the differences between editing manually and editing digitally? What tools are used for each?

Answers

Answer:

Both manual and digital editing are concepts used in proofreading.

Manual editing is also called "hard proofreading" (or "hard proofing" for short). It is the process of proofreading, modifying or revising printed documents. In this type of proofreading, one would normally manually mark parts of the printed documents with editing materials such as ink, pen, marker e.t.c

Digital editing is also called "soft proofing". In contrast to manual editing, this type is done on digital documents. These documents include, but not limited to, DOC, txt, PDF, image, audio and video files.

Tools for editing manually are;

i. pen

ii. ink

iii. tipex

Tools for editing digitally are;

i. Photoshop application

ii. Text editors such as notepad++, Microsoft word

Proofreading has evolved in recent times as a result of advancements in technology. Now, manual proofreading has paved way for digital proofreading, which allows revising of PDF and  DOC files. The difference in both forms is as follows:

Manual Editing: In the process of revising or proofing printed documents, one would manually apply standard proofreading marks. Manual editing is also known as "Hard proofing", as the process requires proofreaders to mark the hard copies.

Digital Editing: In the process of revising or proofing digital documents i.e. PDF and DOC files, one would digitally apply the proofreading marks. Thus, corrections and edits are transferred electronically among authors, proofreaders. Digital editing is also known as "Soft proofing", as the process requires proofreaders to mark the soft copies i.e. without using any paper or pen.

There are a number of electronic tools and marks available for both techniques of

proofreading. Some tools used for manual proofreading include- deletion, capitalization, and  insertion, close-up, transpose.

Tools used in digital proofreading include- spell check, readability levels, trite expressions,  and comment, track changes.

Learn More: https://brainly.com/question/10002469

True or False: It is okay to just paste the URLs of the items you used for references at the end of a paper. Select one: True False

Answers

True as long as it isn’t on a test

It is not okay to just paste the URLs of the items you used for references at the end of a paper therefore the answer is False

For better understanding, lets explain why the answer is false

When citing a reference it not OK to cite URLs. when you are citing onlh the URL is wrong because theURL could change at any time and the fact remain that it is not everyone who reads your paper can do it electronically or has access to the internet., so the url is not the first step to take. The right thing to do is to give the name of the paper, the author(s), the Journal it was published in and the year it was published.



From the above, we can therefore say that the answer is It is not okay to just paste the URLs of the items you used for references at the end of a paper therefore the answer is False, is correct.

Learn more about referencing from:

https://brainly.com/question/13003724

#Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #The first parameter represents how many apostrophes should #be in the string. The second parameter represents how many #quotation marks should be in the string. The third #parameter represents how many apostrophe-quotation mark #pairs should be in the string. # #For example, random_marks(3, 2, 3) would return this #string: #'''""'"'"'" # #Note that there are three apostrophes, then two quotation #marks, then three '" pairs. #Add your function here!

Answers

Answer:

def random_marks(apostrophe, quotation, apostrophe_quotation):

   return "'"*apostrophe + "\""*quotation + "'\""*apostrophe_quotation

   

print(random_marks(3, 2, 3))

Explanation:

Create a function called random_marks that takes apostrophe, quotation, and apostrophe_quotation as parameters. Inside the function, return apostrophe sign times apostrophe plus quotation mark times quotation plus apostrophe sign quotation mark times apostrophe_quotation.

Note that plus sign (+) is used to concatenate strings. Also, if you multiply a string with a number, you get that number of strings ("#"*3 gives ###).

Then, call the function with given parameters and print

Explain why an organization's firewall should block incoming packets the destination address of which is the organization's broadcast address?

Answers

Answer:

The classification including its given topic has always been outlined in section through below justifications.

Explanation:

Whenever an application running seems to have the destination as either the destination network of the organization, it must use the sophisticated instruments. This would also pressure each host mostly on infrastructure to collect the traffic coming as well as processing the message. Increases system should perhaps be restricted because it will not significantly impact channel or device productivity.Therefore, the firewall of a standard operating organization will block certain traffic with IP addresses as destination host of the organization.Another thing to remember here seems to be that transmitted destination details are usually indicators of an intruder using only a target computer as something of a transmitter. An assailant utilizing a broadcasting channel can trigger the transmitter to occur on a different machine.  

Convert the following numbers from decimal to binary, assuming unsigned binary representation:________.
A) 35
B) 3
C) 27
D) 16

Answers

Answer:

Binary representations of following are:

A) 35 = 100011

B) 3 = 11

C) 27 = 11011

D) 16 = 10000

Explanation:

The method to generate the binary number from a decimal is :

Keep on dividing the number by 2 and keep on tracking the remainder

And the quotient is again divided and remainder is tracked so that the number is completely divided.

And then write the binary digits from bottom to top.

Please have a look at the method in below examples:

A) 35

[tex]\begin{center}\begin{tabular}{ c c c }Number & Quotient & Remainder\\ 2 & 35 & 1 \\ 2 & 17 & 1 \\ 2 & 8 & 0 \\ 2 & 4 & 0 \\ 2 & 2 & 0 \\ 2 & 1 & 1\end{tabular}\end{center}[/tex]

Writing the remainder from bottom to top.

So, binary number is 100011

B) 3

[tex]\begin{center}\begin{tabular}{ c c c }Number & Quotient & Remainder\\ 2 & 3 & 1 \\ 2 & 1 & 1 \\ \end{tabular}\end{center}[/tex]

Writing the remainder from bottom to top.

So, binary equivalent is 11.

C) 27

[tex]\begin{center}\begin{tabular}{ c c c }Number & Quotient & Remainder\\ 2 & 27 & 1 \\ 2 & 13 & 1 \\ 2 & 6 & 0 \\ 2 & 3 & 1 \\ 2 & 1 & 1 \end{tabular}\end{center}[/tex]

Writing the remainder from bottom to top.

So, binary equivalent is 11011.

D) 16

[tex]\begin{center}\begin{tabular}{ c c c }Number & Quotient & Remainder\\ 2 & 16 & 0 \\ 2 & 8 & 0 \\ 2 & 4 & 0 \\ 2 & 2 & 0 \\ 2 & 1 & 1 \\\end{tabular}\end{center}[/tex]

Writing the remainder from bottom to top.

So, binary equivalent is 10000.

Answers are:

Binary representations of following are:

A) 35 = 100011

B) 3 = 11

C) 27 = 11011

D) 16 = 10000

g Write a C program that prompts the user for a string of, up to 50, characters and numbers. It can accept white spaces and tabs and end with a return. The program should keep track of the number of different vowels (a,e, i, o, u) and the number of digits (0, 1, 2, 3, 4, 5, 6, 7, 8,9). The program should output the number of occurrences of each vowel and the number of occurrences of all digits.

Answers

Answer:

Following are the code to this question:

#include <stdio.h> //defining header file

#include <string.h>//defining header file

int main()//defining main method

{

char name[50]; //defining character variable

int A=0,E=0,I=0,O=0,U=0,value=0,i,l; //defining integer variables

printf("Enter string value: ");//print message

gets(name);//input value by gets method

l=strlen(name);//defining l variable to store string length

for(i=0; i<50; i++) //defining loop to count vowels value

{

if(name[i] == 'A' || name[i] == 'a') //defining if condition count A value A++;//increment value by 1

else if(name[i] == 'E' || name[i] == 'e')//defining else if condition count E value

E++;//increment value by 1

else if(name[i] == 'I' || name[i] == 'i') //defining else if condition count I value

I++;//increment value by 1

else if(name[i] == 'O' || name[i]== 'o') //defining else if condition count O value

O++;//increment value by 1

else if(name[i] == 'U' || name[i] == 'u')//defining else if condition count U value

U++;//increment value by 1

else if(name[i]>= '0' && name[i] <= '9')//defining else if condition count digits value

value++;//increment value by 1 }

printf("A: %d\n",A);//print A value

printf("E: %d\n",E); //print E value

printf("I: %d\n",I);//print I value

printf("O: %d\n",O);//print O value

printf("U: %d\n",U);//print U value

printf("value: %d",value);//print digits value

return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, a char array "name" and integer variables "A, E, I, O, U, i, value and l" declared, in which name array store 50 character value, which uses the gets function to take string value.after input value strlen method is used to store the length of the input string in l variable.In the next step, for loop is declared that uses multiple conditional statements to counts vowels and the values of the digits,if it is more then one it increments its value and at the last print method is used to print its count's value.
Other Questions
A kite is flying at an angle of elevation of about 55. Ignoring the sag in the string, find the height of the kite if 85 m of string has been let out. A rectangular prism has a length of 4.2 cm, a width of 5.8 cm, and a height of 9.6 cm. A similar prism has a length of 14.7 cm, a width of 20.3 cm, and a height of 33.6 cm. The dimensions of the smaller prism are each multiplied by what factor to produce the corresponding dimensions of the larger prism? 3 4 4 5 If a borrower receives a loan with a variable interest rate, then the interest rate on the loan Multiple Choice always goes up. is subject to the price of the home. always goes down. is fixed. may go up or down. Which statement is the best description of what a macro can do in Excel 2016? It is a type of formatting users can apply to enlarge the worksheet area. It is a file type that a user can save a workbook as. It is a series of instructions contained in one command that users can apply to automate complex and/or repetitive tasks. It is a recording function that allows you to save worksheets, audio recordings, and videos that are displayed on the screen. Cepeda Corporation has the following cost records for June 2017.Indirect factory labor $5,230Factory utilities $470Direct materials used $21,540Depreciation, factory equipment$1,760Work in process, 6/1/17 $3,820Direct labor $41,680Work in process, 6/30/17 $3,930Maintenance, factory equipment $1,860Finished goods, 6/1/17 $5,210Indirect materials $2,870Finished goods, 6/30/17 $8,510Factory manager's salary $3,550Prepare a Cost of Goods manufactured schedule for June 2017. n is an integer.Write the values of n such that -15 < 3 < 6 2. -, - - , 20 The sum of the digits of a two-digit number is 7 .When the digits are interchanged the reversed number is five times the tens digit of the original number find the original number .frnds pls help meI want answer with full process pls help mepls frnds do it fast pls help me Which of these shapes is congruent to the given shape?A. B. C. D. E. What is the value of G at 25C when the initial concentrations of A, B, and C are 1 M, 1 mM, and 1 M, respectively? For the total population of a large southern city mean family is income 34,000 with a standard deviation for the population of 5000 imagine that you were taking some sample of 200 city residents what is the probability or proportion that your sample mean is between 33,000 and 34000 Based on its 1Q 2014 press release, what is the maximum $ amount the Coca-Cola Company expects to spend in repurchasing its shares during the current fiscal year. Please provide your answer in billions, with 1 decimal place (Ex: 6.2) simplify this please 41 =12d-741=12d7 The diagonal of a square is x units. What is the area of the square in terms of x? One-half x squared square units x squared square units 2x square units One-half x square units How many complex and real roots are in the problem (x+10)^9. The object of the verb is an indirect speeh walahi Find the missing segment in the attached image Many professors have a policy that punishes individuals if they do not come to class. Instead of punishing students who do not attend class, what could the professor do to provide a positive incentive to come to class Which two phrases best describe cells?A. Make up tissuesB. Made up of organsC. The most complex level of organization of lifeD. The simplest level of organization of life How many hydrogen atoms are present in each water molecule?O A. 3OB. 2O C. 1O D. 4