Answer:
Ordered pairing because binary has zero coding language in it so if we use ordered pairing then we can use and to combine the words.
salvado has a flash disk of 1.5GB and wants to store more music files of 950KBs each . How many files will he be able to store on his flash disk?
Answer:
Convert 1.5GB to KBs = 1500000kb
1500000kb/950kb ≈ 1579
Explanation:
A flash disk is a storage device. It has enough memory to store large files. In the given question, the flash disk has a memory of 1.5GB and can store 1578.94 music files of 950KBs each.
What is flash disk?A flash disk is a data storage device that uses flash memory specifically : a small rectangular device which is designed to be plugged directly into a USB port on a computer. It is often used for transferring files from one computer to another computer system.
Flash disks have no mechanical platters or access arms. It is termed "disk" because of the data which are accessed as if they were on a hard drive. The disk storage structure is emulated.
In the given question, the flash disk contains 1.5GB memory and has to store music files of 950KBs each. For determining the number of music files which can be stored in the flash disks, we have to first convert the unit of flash disk from GB to KB:
1GB = 1,000,000 KB
1.5 GB = 1,500,000 KB
size of music file = 950 KB
Number of music files that can be stored = storage in the flash disk ÷ size of the music file
Number of music files = 1500000KB ÷ 950KB
Number of music files = 1578.94
Learn more about Flash disk here:
https://brainly.com/question/1130880
#SPJ2
True/False: A datasum can be generated for any width of data. For example, we can create an 8, 16, or 32 bit datasum for 8, 16, or 32 bit data elements respectively.
Answer:
true
Explanation:
C++ Code Outputs.
I have a problem with my code and I don't know how to make it run as the project that I need below.
This is my code:
#include
#include
#include
#include
using namespace std;
struct courseInfo{
string name;
int unit;
char grade;
};
struct Student {
string fName;
string lName;
string idNumber;
courseInfo courses[2];
int unitCompleted;
double gpa;
};
Student s;
bool openFile(ifstream &in);
void Print_info_one(Student s);
void Read_info(Student &s);
float Find_points(char c) ;
bool openFile(ifstream &inFile){
string line;
int i=0,k=0;
string fName="", lname="", id="", name1="", name2="";
char grade1, grade2;
int unit1, unit2;
if (inFile.is_open())
{
while (getline(inFile, line))
{
while (line[i] != ',')
{
fName += line[i];
i++;
}
i++;
i++;
while (line[i] != ' ')
{
lname += line[i];
i++;
}
i++;i++;
while (line[i] != ' ')
{
id += line[i];
i++;
}
i++;
int count=0;
while (count <2)
{
name1 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade1 = line[i];
i++;i++;
unit1 = line[i]-'0';
i++;i++;
count=0;
while (count <2)
{
name2 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade2 = line[i];
i++;i++;
unit2 = line[i]-'0';
}
inFile.close();
s.fName = fName;
s.lName = lname;
s.idNumber = id;
s.courses[0].name = name1;
s.courses[0].grade = grade1;
s.courses[0].unit = unit1;
s.courses[1].name = name2;
s.courses[1].grade = grade2;
s.courses[1].unit = unit2;
s.unitCompleted = unit1 + unit2;
s.gpa = (unit1*Find_points(grade1) + unit2*Find_points(grade2))/(unit1+unit2);
}
else
{
cout << "Error reading file\n";
return false;
}
return true;
}
void Print_info_one(Student s){
cout << "Name: " << s.fName << ", " << s.lName << " ID Number: " << s.idNumber << " Course 1 Name: " << s.courses[0].name << " Grade: "
<< s.courses[0].grade << " Units: " << s.courses[0].unit << " Course 2 Name: " << s.courses[1].name << " Grade: "
<< s.courses[1].grade << " Units: " << s.courses[1].unit << " Unit completed: " << s.unitCompleted << " GPA:" << s.gpa << endl;
}
void Read_info(Student &s){
}
float Find_points(char grade){
switch (grade)
{
case 'A':
return 4.0;
break;
case 'B':
return 3.0;
break;
case 'C':
return 2.0;
break;
case 'D':
return 1.0;
break;
case 'F':
return 0;
break;
default:
break;
}
return 0;
}
int main() {
ifstream inFile;
std::fstream fs;
fs.open ("input.txt", std::fstream::in );
Print_info_one(s);
return 0;
}
In the screenshots i'm showing the inputs and outputs that I need for the test
Answer:
#include
#include
#include
#include
using namespace std;
struct courseInfo{
string name;
int unit;
char grade;
};
struct Student {
string fName;
string lName;
string idNumber;
courseInfo courses[2];
int unitCompleted;
double gpa;
};
Student s;
bool openFile(ifstream &in);
void Print_info_one(Student s);
void Read_info(Student &s);
float Find_points(char c) ;
bool openFile(ifstream &inFile){
string line;
int i=0,k=0;
string fName="", lname="", id="", name1="", name2="";
char grade1, grade2;
int unit1, unit2;
if (inFile.is_open())
{
while (getline(inFile, line))
{
while (line[i] != ',')
{
fName += line[i];
i++;
}
i++;
i++;
while (line[i] != ' ')
{
lname += line[i];
i++;
}
i++;i++;
while (line[i] != ' ')
{
id += line[i];
i++;
}
i++;
int count=0;
while (count <2)
{
name1 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade1 = line[i];
i++;i++;
unit1 = line[i]-'0';
i++;i++;
count=0;
while (count <2)
{
name2 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade2 = line[i];
i++;i++;
unit2 = line[i]-'0';
}
inFile.close();
s.fName = fName;
s.lName = lname;
s.idNumber = id;
s.courses[0].name = name1;
s.courses[0].grade = grade1;
s.courses[0].unit = unit1;
s.courses[1].name = name2;
s.courses[1].grade = grade2;
s.courses[1].unit = unit2;
s.unitCompleted = unit1 + unit2;
s.gpa = (unit1*Find_points(grade1) + unit2*Find_points(grade2))/(unit1+unit2);
}
else
{
cout << "Error reading file\n";
return false;
}
return true;
}
void Print_info_one(Student s){
cout << "Name: " << s.fName << ", " << s.lName << " ID Number: " << s.idNumber << " Course 1 Name: " << s.courses[0].name << " Grade: "
<< s.courses[0].grade << " Units: " << s.courses[0].unit << " Course 2 Name: " << s.courses[1].name << " Grade: "
<< s.courses[1].grade << " Units: " << s.courses[1].unit << " Unit completed: " << s.unitCompleted << " GPA:" << s.gpa << endl;
}
void Read_info(Student &s){
}
float Find_points(char grade){
switch (grade)
{
case 'A':
return 4.0;
break;
case 'B':
return 3.0;
break;
case 'C':
return 2.0;
break;
case 'D':
return 1.0;
break;
case 'F':
return 0;
break;
default:
break;
}
return 0;
}
int main() {
ifstream inFile;
std::fstream fs;
fs.open ("input.txt", std::fstream::in );
Print_info_one(s);
return 0;
Explanation:
Write a function named power that accepts two parameters containing integer values (x and n, in that order) and recursively calculates and returns the value of x to the nth power.
Answer:
Following are the code to the given question:
int power(int x, int n)//defining a method power that accepts two integer parameters
{
if (n == 0)//defining if block to check n equal to 0
{
return 1; //return value 1
}
else//defining else block
{
x = x * power(x, --n); //use x variable to call method recursively
}
return x; //return x value
}
Explanation:
In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:
In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.In the else block, an integer variable x is defined that calls the method recursively and return x value.A Protocol for networked information
Answer:
Internet Protocol (IP), which uses a set of rules to send and receive messages at the Internet address level; and. additional network protocols that include the Hypertext Transfer Protocol (HTTP) and File Transfer Protocol (FTP), each of which has defined sets of rules to exchange and display information.
Explanation:
could i plz have brainliest so close to next rank
help me pls difhdifhedioheiofhoidhvoidheiofhioefhioe
Answer:
thanks for the free points
Write an application that counts the total number of spaces contained in a quote entered by the user.
Answer:
Explanation:
The following code is written in Java. It asks the user for an input and saves it in a String variable. Then it loops through all the characters in the string and counts the spaces. Finally, it prints the total number of spaces in the String.
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Line Now:");
String userInput = in.nextLine();
int spaceCount = 0;
for (int x = 0; x < userInput.length(); x++) {
if (userInput.charAt(x) == ' ') {
spaceCount++;
}
}
System.out.println(spaceCount);
}
give the one simple program using c++programming language
Answer:
the ejedjrjr eenekrr
eueeue
Explanation:
u4rururirw
Are dogs are dangerous. the golden retriever is a dog. there for the golden retriever is dangerous. is this argument sound or unsound?
Bibliography
There are some formatting errors in this bibliography
page. Which corrections should be made? Check all
that apply
O The title should be in bold.
O There should be a double space between each
citation
Amber, Claire. "How Would Gandhi Respond?"
The World Post. TheHuffington Post.com,
16 Sept. 2011. Web. 28 Feb. 2014.
Wilkinson, Philip. Gandhi: The Young Protester
Who Founded a Nation. Washington, DC:
National Geographic Society, 2005. Print.
Eknath, Easwaran. Gandhi the Man: How One
Man Changed Himself to Change the World.
Tomales, CA: Nilgiri, 2011. Print.
O The citation entries should be in alphabetical order.
The web sources should be listed first.
The second and third lines of the last entry should
be indented
Answer:
There should be a double space between each citation
The citation entries should be in alphabetical order.
The second and third lines of the last entry should be indented
Explanation:
The bibliography page contains some formatting errors which should be corrected before it is standard and acceptable.
First of all, in MLA (and most other styles), it is important to double space each citation to make them easily readable and eliminate errors.
Next, the citation entries needs to be in alphabetical order and not random which makes it easy to find a source.
Also, there needs to be indentation in the second and third lines of the last entry.
Answer:
B,C,E is the answer
Explanation:
I got it right on test...
sorry if its too late
Hope it helps someone else :D
I need help with my homework:
Greetings, secret agent 00111! Your mission, should you choose to accept it, is to help Agent M plan a pizza party. Unfortunately, M has no idea how much pizza to order for his 83 guests. Luck for him, party planning is your specialty! Estimate the number of pizzas he’ll need on scratch paper, and then convert that number to binary and write it here.
Answer:
You need to order 11100 pizzas.
Explanation:
A couple of assumptions here.
Each pizza has 12 slices. Each guest will eat 4 slices (1/3 of a pizza).
83 * 1/3 = 28 pizzas
28 = 11100
What is the best prediction she could make about this
semester's text?
Natalia's class read Shakespeare's Romeo and Juliet
last semester and took a field trip to see it performed
live in a community theater. Today, Natalia learned that
her class will read another work by Shakespeare this
semester
It is a play.
It is an adventure.
It is a fairy tale.
It is a fable.
Answer:its a play
Explanation:
Answer:
A. It is a play
Explanation:
Got the answer correct on the quiz
in pycharm, write a program that prompts the user for their name and age. your program should then tell the user the year they were born. here is a sample execution of the program what is your name? Amanda how old are you? 15. This is what I have so far but I can't get pycharm to tell me the year I was born.
import datetime
name = input("What is your name? ")
age = input("How old are you? ")
year = datetime.datetime.now().year
print("Hello ' + name + ' you were born in " (year - age))
Let's address the few mistakes in your code so far. First, age is of type string and year is of type int. You're trying to subtract an int by a string and that doesn't work. Also, you have inconsistent quotes "Hello '. You should always use the same type of quote. The (year - age)) isn't properly formatted into the print statement. There is no plus adding it.
Here's my working code:
import datetime
name = input("What is your name? ")
age = int(input("How old are you? "))
year = datetime.datetime.now().year
print("Hello " + name + " you were born in " + str((year - age)))
I just fixed your code. Best of luck.
In python, date and time seem to be not its type of data, but the date and time named module can be imported for it to work with the time and date. So, the program and its description can be defined as follows:
Program Explanation:
Importing "datetime" package.Defining two-variable "name, age" in which we input value from user-end.Defining another variable "year" that holds current year value.In the next step, the print method has used that prints the user name with the born year.Program:
import datetime#import package datetime
name = input("What is your name? ")#defining a variable name that uses an inputs method to input string value
age = int(input("How old are you? "))#defining a variable age that uses an inputs method with the int to input value
year = datetime.datetime.now().year#defining a variable year that takes current value in it
print("Hello " + name + " you were born in " + str((year - age)))#defining a print method that print name value with born year
Output:
Please find the attached file.
Learn more:
brainly.com/question/19032453
Dance dance1 = new Dance("Tango","Hernandos Hideaway");
Dance dance2 = new Dance("Swing","Hound Dog");
System.out.println(dance1.toString());
System.out.println(dance2.toString());
class Dance
{
private String name;
private String song;
public Dance(String name, String s)
{
this.name = name;
song = s;
}
public String toString()
{
return name + " " + song;
}
}
What is printed when the program is executed?
a
null null
null null
b
Hernandos Hideaway null
Hound Dog null
c
null null
Swing Hound Dog
d
Tango Hernados Hideaway
Swing Hound Dog
e
null Hernandos Hideaway
null Hound Dog
Answer:
The output of the program is (d)
Tango Hernados Hideaway
Swing Hound Dog
Explanation:
Analyzing the given code segment
In class Dance,
A method named dance was defined with an instance of two string variables/values
which are name and song
public Dance(String name, String s)
In the main of the program,
The first line creates an instance of Dance as dance1
dance1 is initialized with the following string values: "Tango","Hernandos Hideaway"
- The first string value "Tango" will be passed into the name variable of the Dance method
- The second string value "Hernandos Hideaway" will be passed into the song variable of the Dance method
Next, another instance of Dance is initialized as dance2
dance2 is initialized with the following string values: "Swing","Hound Dog"
- The first string value "Swing" will be passed into the name variable of the Dance method
- The second string value "Hound Dog" will be passed into the song variable of the Dance method
On line 3 of the main: System.out.println(dance1.toString());
The values of dance1, which are "Tango","Hernandos Hideaway" are printed
On line 4 of the main: System.out.println(dance2.toString());
The values of dance1, which are "Swing","Hound Dog" are printed
Hence, option d answers the question
Assume you have 100 values that are all different, and use equal width discretization with 10 bins.
a) What is the largest number of records that could appear in one bin?
b) What is the smallest number of records that could appear in one bin?
c) If you use equal height discretization with 10 bins, what is largest number of records that can appear in one bin?
d) smallest?
e) Now assume that the maximum value frequency is 20. What is the largest number of records that could appear in one bin with equal width discretization (10 bins)?
f) . What about with equal height discretization (10 bins)?
Answer:
a) 10
b) 1
C) 10
D) 1
E) 20
F) 10
Explanation:
a) The largest number of records that could appear in one bin
= 10
B) The smallest number of records that could appear in one bin
= 1
C) The largest number of records that cab appear in one bin
= 10
d) smallest number
= 1
e) With frequency = 20. the largest number of records that could appear in one bin with equal width discretization (10 bins)
= 20
f ) with equal height discretization
= 10
describe at least five ways in which information technology can help studying subjects other than computing
Answer:
I'd that IT can help in a great many different fields like
Mathematics, in a manner of solving complex math equations
Statistics, in a manner of creating complex graphs with millions of points
Modeling, in a manner of creating models from scratch, either for cars, personal projects or characters for video games and entertainment
Advertising, in a manner of using IT to create not only the advertisements themselves but also, spreading that advertisement to millions in a single click
Music/Audio, in a manner of creating new sounds and music that wouldn't be able to work in any practical manner
Explanation:
For this project, you will be developing a PY file that contains your code in PyCharm and evaluating a few of the features of PyCharm. If you haven’t already, be sure to install the PyCharm IDE and Python on your computer. Review the tutorials in the Module Two resources to help you install and get started with PyCharm.
In PyCharm, write a program using python that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold:
What is your name? Amanda
How old are you? 15
Hello Amanda! You were born in 2005.
import datetime
name = input("What is your name? ")
age = int(input("How old are you? "))
year = datetime.datetime.today().year
print("Hello {}! You were born in {}.".format(name, year - age))
I hope this helps!
Shelly recorded an audio composition for her presentation. Arrange the following steps that Shelly followed in the proper order.
She added effects to her audio composition.
She saved her audio composition on an optical drive.
She connected her microphone to her computer.
She saved the audio composition in an appropriate file format.
She selected the record option in her DAW.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
Shelly recorded an audio composition for her presentation. She needs to follow the following proper orders to get composition done for her presentation.
She connected her microphone to her computer.She selected the record option in her DAW.She added effects to her audio composition.She saved the audio composition in an appropriate file format.She saved her audio composition on an optical drive.Answer:
She connected her microphone to her computer.
She selected the record option in her DAW.
She added effects to her audio composition.
She saved the audio composition in an appropriate file format.
She saved her audio composition on an optical drive.
server.
10. The Domain Name refers to the
a) Mail
b) Google
c) Internet
d) Local
Answer:
C.
Explanation:
What term refers to a sequence of statements in a language that both humans and computers can understand?
a
hexadecimal
b
program
c
binary
d
macro
Answer your answer is Macro
Explanation:
Macro shares language both the computer and the programmer can undestand.
a) Explain 3 phase Alternative Current with aid of diagram.
Three-phase electric power is a common method of alternating current electric power generation, transmission, and distribution. It is a type of polyphase system and is the most common method used by electrical grids worldwide to transfer power. It is also used to power large motors and other heavy loads.
A three-wire three-phase circuit is usually more economical than an equivalent two-wire single-phase circuit at the same line to ground voltage because it uses less conductor material to transmit a given amount of electrical power. Polyphase power systems were independently invented by Galileo Ferraris, Mikhail Dolivo-Dobrovolsky, Jonas Wenström, John Hopkinson and Nikola Tesla in the late 1880s.
what do we use HTTP and HTML for?
HTML is a Language while HTTP is a Protocol.
HTML tags are used to help render web pages. The Hypertext Mark-up Language (or HTML) is the language used to create documents for the World Wide Web.
HTTP (Hypertext Transfer Protocol) is a protocol for transferring the hypertext pages from Web Server to Web Browser. HTTP is a generic and stateless protocol which can be used for other purposes as well using extensions of its request methods, error codes, and headers. Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web.
Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the count of how many numbers were entered.
total = 0
count = 0
while total < 100:
num = int(input("Enter a number: "))
total += num
count += 1
print("Sum: {}".format(total))
print("Numbers Entered: {}".format(count))
I'm pretty sure this is what you're looking for. Best of luck!
Marly is using her smartphone to review a webpage she created. The formatting and alignment of webpage elements is incorrect. What does she need to change to fix the problem?
a. C++
b. HTML
c. JavaScript
d. CSS
Answer:
d
Explanation:
CSS is the element to design a webpage and make it look appeasing
c++ is a programming language that is not used in webpages (like Python)
JS makes interactive features
HTML is just the text
what is a technology?
Answer:
The definition of technology is science or knowledge put into practical use to solve problems or invent useful tools
OR
Technology is the sum of techniques, skills, methods, and processes used in the production of goods or services or in the accomplishment of objectives, such as scientific investigation
Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
Answer:
Explanation:
public class RecursiveCalls {
public static void backwardsAlphabet(char currLetter) {
if (currLetter == 'a') {
System.out.println(currLetter);
}
else {
System.out.print(currLetter + " ");
backwardsAlphabet(--currLetter);
}
return;
}
public static void main (String [] args) {
char startingLetter = '-';
startingLetter = 'z';
// Your solution goes here
backwardsAlphabet(startingLetter);
return;
}
}
Describe an algorithm that takes as input a list of n integers in nondecreasing order and produces the list of all values that occur more than once. (
Answer:
Input a series of integer numbers and split the string from the input to get a list. Then check and convert each string to integer with a list comprehension. Create a new variable with a value equal to the set of the list ( to get unique values) then check for the occurrence of each value in the original list.
Explanation:
This algorithm is used to check for the occurrence of values in a list that has been sorted in ascending order. This is faster if the items in the list is not converted to integer yet (still strings) before writing a for loop to check the value count in the list.
Write a function in Java that takes in the int[] array, sorts it using bubble sort, then returns back the sorted array.
//Class to test the bubble sort
public class BubbleSortTest{
//Method to sort the array using bubbleSort
//Takes the array to be sorted as argument
public static int[] bubbleSort(int[] arr) {
//Create an integer to hold the length of the array
int n = arr.length;
//Create a temporary variable to hold the values of the
//array
//for swapping purposes. Initialize it to zero
int temp = 0;
//Cycle through the array element by element
for(int i = 0; i < n; i++){
//For each element
for(int j = 1; j < (n-i); j++){
//if the element is greater than the element after it
if(arr[j-1] > arr[j]){
//swap the elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
} //End of if
} //End of inner for
} //End of outer for
//return the sorted array
return arr;
}
//main method
public static void main(String [] args){
//create a sample array
int [] myArray = {56, 23, 7, 4, 6};
//Call the bubbleSort() method to sort the array
int [] sortedArray = bubbleSort(myArray);
//Print out the sorted array
for(int i = 0; i < sortedArray.length; i++){
System.out.print(sortedArray[i] + " ");
}
} //End of main method
} //End of class BubbleSortTest
Sample Output
4 6 7 23 56
Explanation:
The code above has been written in Java and it contains comments explaining necessary parts of the code. Please go through the comments. A sample output has also been provided.
For clarity, the following shows the actual function alone without using or including it in a class.
=========================================================
//Method to sort the array using bubbleSort
//Takes the array to be sorted as argument
public static int[] bubbleSort(int[] arr) {
//Create an integer to hold the length of the array
int n = arr.length;
//Create a temporary variable to hold the values of the array
//for swapping purposes. Initialize it to zero
int temp = 0;
//Cycle through the array element by element
for(int i = 0; i < n; i++){
//For each element
for(int j = 1; j < (n-i); j++){
//if the element is greater than the element after it
if(arr[j-1] > arr[j]){
//swap the elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
//return the sorted array
return arr;
}
=========================================================
4. Word Separator:Write a program that accepts as input a sentence in which all of thewords are run together but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example the string “StopAndSmellTheRoses.” would be converted to “Stop and smell the roses.”
*python coding
sent = input("")
count = 0
new_sent = ""
for i in sent:
if count == 0:
new_sent += i
count += 1
else:
if i.isupper():
new_sent += " "+i.lower()
else:
new_sent += i
print(new_sent)
The above code works if the user enters the sentence.
def func(sentence):
count = 0
new_sent = ""
for i in sentence:
if count == 0:
new_sent += i
count += 1
else:
if i.isupper():
new_sent += " " + i.lower()
else:
new_sent += i
return new_sent
print(func("StopAndSmellTheRoses."))
The above code works if the sentence is entered via a function.
Write an expression that will print "in high school" if the value of user_grade is between 9 and 12 (inclusive).
Answer:
C#
if(user_grade >=9 && user_grade <=12)
{
Console.WriteLine("In Highschool");
}
Python
if user_grade >= 9 & user_grade <= 12:
print("In Highschool")
Java
if(user_grade >=9 && user_grade <=12)
{
System.println("In Highschool");
}
Explanation: