Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimeters) specified as a floating point value. The program then echoes the input and computes areas of squares and circles and the volume of a cube. For the squares, you will assume that the input length value is the length of a side. For the circles, this same value becomes the diameter. Use the meter value input to calculate the results in square (or cubic) meters and then print the answers in square (or cubic) meters.
Answer:
import math
l = float(input("Enter length in cm: "))
l = l / 100;
print("Entered length is " + str(l) + " meters")
area_square = l * l
print("Area of square is " + str(area_square))
area_circle = math.pi * l/2 * l/2
print("Area of circle is " + str(area_circle))
volume_cube = l * l * l
print("Volume of cube is " + str(volume_cube))
Explanation:
*The code is in Python
Ask the user to enter the length in cm
Convert the length to meters and print it
Calculate the area of the square and print it (Since length is equal to a side, the area is length * length)
Calculate the area of the circle and print it (Since length is equal to the diameter, you need to divide it by two to get the radius. The area is pi * length/2 * length/2)
Calculate the volume of the cube and print it (Since length is equal to a side, the volume is length * length * length)
Write a program that performs the following tasks: Display a friendly greeting to the user Prompt the user for the value to convert (a String) Accept that String Prompt the user for the value of the initial base (an integer) Accept that integer Prompt the user for the desired base of the output (an integer) Accept that integer If the String is not a legal expression of a number in the initial base, display an error message and exit the program. Convert the value represented by the String in the initial base to the desired base. Display the result.
Explanation:
import java.util.Scanner;
import java.math.BigInteger;
public class Main
{
private int x;
public static boolean isValidInteger(String theValue, int theBase)
{
BigInteger number = new BigInteger(theValue,theBase);
if(theValue.equals(number.toString(theBase)))
{
return true;
}
else
return false;
}
public static String convertInteger(String theValue, int initialBase, int finalBase)
{
boolean valid=isValidInteger(theValue,initialBase);
if(valid==true)
{
BigInteger number = new BigInteger(theValue);
return(number.toString(finalBase));
}
else
return("String not in initial base");
}
public static void main(String[] args)
{
System.out.println("Welcome");
String value;
int ibase, dbase;
if(args.length==0)
{
Scanner S = new Scanner(System.in);
System.out.println("Enter Value to be converted :: ");
value = S.nextLine();
System.out.println("Enter initial base :: ");
ibase = S.nextInt();
System.out.println("Enter desired base :: ");
dbase = S.nextInt();
}
else
{
value=args[0];
ibase=Integer.parseInt(args[1]);
dbase=Integer.parseInt(args[2]);
}
System.out.println("Change base "+convertInteger(value,ibase,dbase));
}
}
Output
_______tools enable people to connect and exchange ideas.A) Affective computing. B) Social media. C) Debugging D) Computer forensics.
Answer:
B) Social media.
Explanation:
Social media is well, a media, that allows you to share things with people and have discussions.
Write a program that prompts the user to input an integer that represents the money in cents. The program will the calculate the smallest combination of coins that the user has. For example, 42 cents is 1 quarter, 1 dime, 1 nickel, and 2 pennies. Similarly, 49 cents is 1 quarter, 2 dimes, and 4 pennies
Answer:
The program in Python is as follows:
cents = int(input("Cent: "))
quarter = int(cents/25)
if quarter > 1:
print(str(quarter)+" quarters")
elif quarter == 1:
print(str(quarter)+" quarter")
cents = cents - quarter * 25
dime = int(cents/10)
if dime>1:
print(str(dime)+" dimes")
elif dime == 1:
print(str(dime)+" dime")
cents = cents - dime * 10
nickel = int(cents/5)
if nickel > 1:
print(str(nickel)+" nickels")
elif nickel == 1:
print(str(nickel)+" nickel")
penny = cents - nickel * 5
if penny > 1:
print(str(penny)+" pennies")
elif penny == 1:
print(str(penny)+" penny")
Explanation:
This line prompts user for input in cents
cents = int(input("Cent: "))
This line calculates the number of quarters in the input amount
quarter = int(cents/25)
This following if statement prints the calculated quarters
if quarter > 1:
print(str(quarter)+" quarters")
elif quarter == 1:
print(str(quarter)+" quarter")
cents = cents - quarter * 25
This line calculates the number of dime in the input amount
dime = int(cents/10)
This following if statement prints the calculated dime
if dime>1:
print(str(dime)+" dimes")
elif dime == 1:
print(str(dime)+" dime")
cents = cents - dime * 10
This line calculates the number of nickels in the input amount
nickel = int(cents/5)
This following if statement prints the calculated nickels
if nickel > 1:
print(str(nickel)+" nickels")
elif nickel == 1:
print(str(nickel)+" nickel")
This line calculates the number of pennies in the input amount
penny = cents - nickel * 5
This following if statement prints the calculated pennies
if penny > 1:
print(str(penny)+" pennies")
elif penny == 1:
print(str(penny)+" penny")
Discuss the main characteristics of the database approach and how it differs from traditional file systems.
The database system allows the creation of a single depository of information, which is updated periodically and which can be used simultaneously by many users, since this type of system allows the effective sharing of all data stored in its depository . In addition, this is a secure system and is very difficult to break into. This is because of the efficiency of the software used to maintain it. However, the use of these softwares can be a little complicated for users, in addition to requiring a high economic cost to obtain them.
The traditional file system, in turn, each user must obtain their own file related to the application they want to run. This may seem dull in comparison to the database, but it is advantageous as it does not require any spending on software, as it is simple and there are several cheap and efficient tools and editors on the market. However, this system is not so safe, it can cause isolation of data and even data inconsistency, which disrupts the entire system.
A general rule for printing is to use _____ fonts for headlines and serif fonts for body text. sans-serif fantasy cursive monospace
Answer:
sans-serif
Explanation:
Fonts can be defined as a graphical representation of texts which includes a collection of characters such as numbers, letters, symbols etc in various size, color, typeface, design or weight.
A general rule for printing is to use sans-serif fonts for headlines and serif fonts for body text. This ultimately implies that, for any printed work such as novels, books, newspapers etc, it is a general rule for a printer to use sans-serif fonts for headlines and serif fonts for body text in order to enhance readability.
Also, it can be reversed in some instances by using a serif font for headlines and a sans-serif font for the body of a text.
How can you say that a computer is a versatile machine?
Answer:
A computer is a versatile machine because is used for many purposes,a modern day computer can run multiple data at once making a fast and efficient machine very durable and effective for our use in all areas of life.
The __________ utility has the capability to manage users, create and administer user groups, and apply user rights to those users and groups. Active Directory Administrative Center Active Directory Domains and Trusts Active Directory Sites and Services Active Directory Users and Computers
Answer:
Active Directory Users and Computers
Explanation:
Active Directory Users and Computers is a term that describes Microsoft Management Console that is utilized in conducting and managing Active Directory, the objects; which comprises of the users and computers, the Organizational Units, together with their characteristics.
Hence, the Active Directory Users and Computers utility has the capability to manage users, create and administer user groups, and apply user rights to those users and groups.
How many pins are in the power supply connector that is typically used on most motherboards today?
Answer: 4 pins
Explanation:
_______ tools enable people to connect and exchange ideas.
A) Affective computing.
B) Social media.
C) Debugging
D) Computer forensics.
Social media is a tool that enables people to connect and exchange ideas. Thus the correct option is B.
What is communication?Communication is referred to the exchange of information between two individuals in the form of conversation, opinion, suggestion, or advice with the help of medium or direct interaction.
Social media is referred to as a tool of communication that enables people to share their ideas, thoughts, and opinions with a wide network of people and helps them to get information about the events happening in the world.
An internet tool for interaction, information sharing, and social networking is social media. Networking software that connects people around the world is an internet-based technology, strictly understood.
Therefore, option B is appropriate.
Learn more about Communication, here:
https://brainly.com/question/22558440
#SPJ5
Social media is a tool that enables people to connect and exchange ideas. Therefore, the correct answer is option B.
The exchange of information between two people in the form of conversation, opinion, suggestion, or advice with the use of a medium or direct interaction is referred to as communication.
Social media is referred to as a communication tool that enables individuals to communicate their thoughts, ideas, and opinions with a large network of people and assists them in learning about global events.
Social media is an online medium for communication, sharing of knowledge, and social networking. According to the definition of the term, internet-based technology includes networking software that links individuals worldwide.
Therefore, the correct answer is option B.
Learn more about communication here:
brainly.com/question/22558440
#SPJ6
What benefits does the Domain Name System (DNS) provide? Check all that apply.
Network Address Translation (NAT)
Ease of address memorization
Assigning Internet Protocol (IP) addresses
Easy mapping to a new Internet Protocol (IP) address
Answer:
Option C (Assigning Internet Protocol (IP) addresses) is the correct choice.
Explanation:
DNS is a centralized process for resolving as well as continuing to give IP addresses for something like a specified domain name, a method that allows you to search a site via your web browsers whenever you tab or switch on any web server (Internet Explorer, chrome, respectively.).This helps everyone to still have throughput mostly on the network although one of the databases becomes offline for maintenance.All other options are not relevant to the situation in question. It is the right answer to all of the above.
Answer:the TCP
Explanation:
Read the following code:
x = currentAge
print(x + 20)
What value will this code calculate?
Select one:
a. Age in 20 years
b. Age 20 years ago
c. Age at 20 years old
d. Age in the year 2020
Answer:
The answer is "A) Age in 20 years"
Explanation:
Assuming currentAge is declared and is an integer, you are adding 20 to your current age which means it will print your age in 20 years.
Which symbol is at the beginning and end of a multiline comment block?
The beginning of a block comment or a multi-line comment is marked by the symbol /* and the symbol */ marks its end.
paragraph on how atms work
Today technology is based in Science and engineering, earlier it was based on
__________ _____-_____.
Answer:
Technical know-how
Explanation:
Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a week later you find out someone took that image and put it on a T-shirt that they’re selling for $10 each.
Now that we understand Copyright, what would need to change in order for the scenario from the warm-up to be okay?
Answer:
I will develop a CREATIVE COMMONS LICENSE
Explanation:
Based on the scenario given what i would need to change for the scenario from the warm-up to be okay is for me develop CREATIVE COMMONS LICENSE and the reason why I would develop this type of license is that it will enable people or the public to freely make use of my work or have free licence to the work that I have created by freely using it on their own products which will enables them to sell their work which have my own work on them easily and freely without any form of restrictions.
Copyright allows the creator or owner of a property (usually intellectual property) to have an absolute right over his property.
What needs to be done in this scenario is to create a creative common license.
In copyright, creative common license allows the members of the public to make use of an intellectual property for free, while the owner still retains the ownership and right, over the property.
When the creative common license is done, the seller of the T-shirt can sell the T-shirt without remitting any incentive to you; however, the seller gives you credit and recognition for the image.
Read more about copyrights at:
https://brainly.com/question/17357239
Recursion is a natural use for a _____ (stack or queue)
Answer:
Stack
Explanation:
Any function that call itself can be regarded as recursive function, it should be noted that Recursion is a natural use for a stack, especially in the area of book keeping.
Recursion is very important because some of problems are usually recursive in nature such as Graph and others, and when dealing with recursion , only base and recursive case is needed to be defined.
Some areas where recursion is used are in sorting and searching.
One of the simplest and best known polyalphabetic ciphers is _________ cipher. In this scheme, the set of related monoalphabetic substitution rules consists of the 26 Caesar ciphers with shifts of 0 through 25. Each cipher is denoted by a key letter which is the ciphertext letter that substitutes for the plaintext letter a.
Answer:
Vigenere
Explanation:
Vigenere Cipher is an encryption method of alphabetic symbols that utilizes an easy form of polyalphabetic exchange which is carried out through Vigenere table.
Hence, in this situation, the correct answer is VIGENERE Cipher because it is the form of cipher whereby the set of related monoalphabetic substitution rules comprises of the 26 Caesar ciphers with shifts of 0 through 25. Each cipher is indicated by a key letter which is the ciphertext letter that substitutes for the plaintext letter.
if you exit a program without saving the document on which you are working, or the computer accidentally losses electrical power, the document will be lost
Which of the following statement about device formatting is FALSE?
A) Device manufacturers store the initial file-system data structures in the device.
B) Operating system can create multiple partitions with in a single device.
C) Volume creation is implicit when a file system is placed directly within a partition.
D) Not every partition contains a copy of the operating systems.
Answer:
The correct option is;
A) Device manufacturers store the initial file-system data structures in the device.
Explanation:
Before a storage device can be used for data storage, it is required to prepare the device for use and to make the device to become visible to the operating system by formatting of the device
New storage devices are not pre-formatted or come with a ready to use file system as there are different file systems specifically designed for particular operating systems or operating environment.
Formatting creates partitions, makes the hard drive visible to the operating system and creates a file system that is new such that the storage device can be used for storing files.
What makes Java platform independent?
Answer:
Java it is the use of Byte code that makes it platform independent.
Explanation:
Java platform independent language allows its the end users to access they source code and other language automatically,its a human readable language.
Java is created in the James Gosling at the sun micro systems,and java is an open source programming language, generally the people refer the java because its source connections.Java code may be use sequence of machine that can be use executed by the directly CPU,and all the program in java are compiled by java c.Java is an independent platform and variety of methods, its object oriented language, and java is study platform.Java program are compiled into byte code and that byte code is platform independent, and they machine execute the byte code the java virtual machine.Java is the platform independent because it does not depend on the type of platform,and the virtual machine also interpret the representations.Java compiler is the .class file or the byte code and the machine native code,java is that depend on java virtual machine.Java is does not required any licence to the run and they also reliable platform to work on.Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they contain?
Answer:
Logographic, syllabic, and alphabetic elements. I think thts what u were asking for?
Explanation:
What device to use when downloading a large file?
Web pages are accessed through a software program called a _____.A) web crawlerB) web browserC) web serverD) web app drawer
Answer: B) web browser
Explanation: A web browser may be explained as a software program or application available on various operating systems such as windows, Mac, Android, iOS among others. This program acts as an interface between information available on websites or pages and users. This application takes a specified uniform resource locator or web address as input and outputs the information available on a web page. Google Chrome, Internet Explorer, Microsoft edge, opera mini, Safari, Firefox and so on.
Clicking and double-clicking are two of the five
Answer:
The correct answer is events
Why do I have two random warnings?
Answer:
bc of katie
Explanation:
For demultiplexing a UDP socket is identified by:_____.
Answer:
1. Destination IP address
2. Destination Port number
Explanation:
Demultiplexing is a term that describes a procedure of transforming a signal that has multiple analog or digital signal flows into different initial and unconnected signals.
Hence, in this situation, the correct answer is that for the demultiplexing process, a UDP (User Datagram Protocol) socket is identified by both the destination IP address and destination port number
Research and a well-written problem statement are important because A)they give a clear understanding of the problem and its solution. B)they ensure that anyone in the general public will be able to understand and solve the problem. C)they give a list of the needs of the stakeholders. D)they ensure that questions still need to be asked about the problem.
Answer:
A. they give a clear understanding of the problem and it's solution
Explanation:
Research and a well-written problem statement are important because they give a clear understanding of the problem and its solution.
Answer:
Research and a well-written problem statement are important because
they give a clear understanding of the problem and its solution.
they ensure that anyone in the general public will be able to understand and solve the problem.
they give a list of the needs of the stakeholders.
they ensure that questions still need to be asked about the problem.
Chunking is a good strategy for completing large assignments because it makes the work
O less boring.
more thorough.
less difficult
O more manageable.
Answer:
D. more manageable
Explanation:
it wouldn't make the work less boring, wont make work less difficult and and it wont help u get more through quicker
HELP FAST PLEASE!!! What is a glass tube containing electrodes used as a switch to produce on or off signals for the computer? First person to answer gets branliest. :3
Answer:
The answer is... Vaccum Tubes...
This is one which was used in computers before the Phenomenal invention of Transisitors.
A glass tube containing electrodes used as a switch to produce on or off signals for the computer is a Vacuum Tube.
What is a vacuum tube?A vacuum tube is a tube that controls the transfer of electrons inside a tub. It is a valve. It is also called an electronic device used in television, amplifiers, radios, etc.
A vacuum tube contains a cathode and anode. The cathode is heated, and it emits or releases electrons. This emission is called thermionic emission. It controls the transfer of electrons, in a high-charge device. This is applied to the device where the electric potential difference is very high.
Vacuum tubes are used in old times, they are still used in some industries.
Thus, a vacuum tube is a glass tube with electrodes that serves as a switch to generate on or off signals for the computer.
To learn more about vacuum tubes, refer to the link:
https://brainly.com/question/14992264
#SPJ2