Answer:
The output will be "C"; without the quotes
Explanation:
Given
The program above
Required
What will be the output if user input is 95
The output will be 95;
Analysis
1. Initially, grade = "Unknown"
grade = "Unknown";
2. Because user input is greater than 90, grade changes its value from "Unknown" to: grade = "A"
if (score >= 90)
grade = "A";
2. Because user input is greater than 80, grade changes its value from "A" to: grade = "B"
if (score >= 80)
grade = "B";
3. Because user input is greater than 70, grade changes its value from "B" to: grade = "C"
if (score >= 70)
grade = "C";
4. This will not be executed because it specifies that if user input is less than 70; Since, this statement is false; the value of grade is still "C"
else grade = "F";
5. The value of grade is printed
cout << grade;
the typing area is bordered on the right side by bars in ms word
Answer:
Explanation:
PTA NHI
Write a function wordcount() that takes the name of a text file as input and prints the number of occurrences of every word in the file. You function should be case-insensitive so 'Hello' and 'hello' are treated as the same word. You should ignore words of length 2 or less. Test your implementation on file great_expectations.txt¶
Answer:
I am writing a Python program:
import string # here is this is used in removing punctuation from file
def wordcount(filename): #definition of wordcount method that takes file name as argument
file = open(filename, "r") #open method opens the file whose name is specified and r is for read mode. Object "file" is used to open a file in read mode
count = dict() #creates a dictionary
for strings in file: # iterates through every line of the text file
strings = strings.strip() #strip() method removes the white spaces from every line of the text file
strings = strings.lower() #converts all the characters of the text file to lower case to make function case insensitive
strings = strings.translate(strings.maketrans("", "", string.punctuation)) # deletes punctuation each line of the text file
words = strings.split(" ") #split the lines of file to a list of words
for word in words: #iterates through each words of the list of words
if len(word)>2: #ignores words of length 2 or less
if word in count: #if word is present in dictionary count already
count[word] = count[word] + 1 #then add 1 to the existing word count
else: #if the word is not present already in the dictionary
count[word] = 1 # set the count of the word that is not already present to 1 in order to add that word to dictionary
for key in list(count.keys()): # iterates through each key (words) in the list of words and print the contents of dict counts i.e. words along with their no. of occurrences
print(key, ":", count[key]) # print the words and their occurences in word:occurence format for example hello:1 means hello exists once in text file
file.close() #closes the file
#two statements first ask the user to enter the name of the file and then call the function wordcount() by passing the name of that file in order to print the number of occurrences of every word in the file.
name = input('Enter a filename: ')
wordcount(name)
Explanation:
The program is well explained in the comments above. The program has a function wordcount() that takes a text file name as its parameter. First it opens that file in read mode. Then the first for loop moves through each line of the text file and removes the white spaces from every line of the text file using split() method, converts all the characters of the text file to lower case to make function case insensitive using lower() method, deletes punctuation each line of the text file using maketras() method and translate methods. maketrans() method specify the list of punctuation that need to be remove from the each line of the file. This method then returns this list in the form of a table which is passed to translate() method. Then translate() method uses this table to modify lines in order to remove the punctuation from lines. Next the lines are split into list of words using split() method. Then the second for loop moves through each word and counts the number of occurrences of each word in the text file. len(word)>2: len function returns the length of the word and if the length of the word is less than 2 than that word is ignored. count is set to 1, every time a new word is added to dictionary and if the word is already present in the dictionary then the count of word is incremented by 1. At the end the contents of dictionary are displayed in key: count[key] format in which key is each word and value is the number of occurrences of that word. Since the great_explectations.txt file is not attached so i have used my own file. You can use this code for you file.
C++ CHALLENGE ACTIVITY 2.15.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya.
Answer:
Following are the program is given below
#include <iostream> // header file
#include<string> // header file
using namespace std; // namespace
int main() // main function
{
string fname,lname; // variable declaration
cin>>fname>>lname; // Read the input by user
cout<<lname; // print last name
cout<<", "; // display comma
cout<<fname<<endl; // display first name
return 0;
}
Output:
Maya Jones
Jones, Maya
Explanation:
Following are the description of program .
Declared a variable "fname" and the "lname" as the string datatype .Read the input by user in the "fname" and the "lname" variable by using cin function in c++.After that print the "lname" variable.then print the comma and finally print the "fname" variableEliza needs to share contact information with another user, but she wants to include only certain information in the contact. What is the easiest way for her to achieve this?
Answer:
Use the edit business card dialog box to control the information.
Explanation:
Business card is an easiest way to share contact details with other persons. There are some reasons a person might not want to share entire details of the contact it has with the other person, for this purpose the business card outlook has an option to edit the information of contact before sending it to the other person. Click the contact card and select the relevant contact that needs to be shared, then double click the contact it will display an edit option.
Answer:
b
Explanation:
Front wheel drive vehicles typically use
Answer:
Front wheel drive vehicles usually use positive offset wheel
Explanation:
draw the flowchart to calculate the area of the rectangle 50m length and width 30m.
Answer:
---- ----
Explanation:
1) Start
2) Rectangle: Read Length and Width.
3) Calculate
4) Print (Calculate)
What variable can be changed when using the WEEKDAY function
Answer:
This brainly page should be able to help, make sure to thank them if it's correct
https://brainly.com/question/15076370
Answer:
B the day of the week that starts week
Explanation:
just took it
On a system with paging, a process cannot access memory that it does not own. Why? How could the operating system allow access to other memory?
Answer:
Because the page is not in its page tableThe operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page tableExplanation:
On a system with paging, a process cannot access memory that it does not own because the page is not in its page table also the operating system controls the contents of the table,therefore it limits a process of accessing to only the physical pages allocated to the process.
The operating system could allow access to other memory by allowing entries for non-process memory to be added to the process page table.that way two processes that needs to exchange data can efficiently do that . i.e creating a very efficient inter-process communication
It's not possible to die in an alcohol-related collision if you're not in an automobile.
A. True
B. False
Answer:
B. False
Explanation:
Consumption of alcohol is not a good practice and is generally not allowed at the time of driving an automobile and is considered to be an offense as it may be injurious to health and property. As too much alcohol can create possible chances of collusions and even if the person is not in an automobile can result in a collision if tries to cross the road. Like head injuries or leg injuries can occur.You are designing an internet router that will need to save it's settings between reboots. Which type of memory should be used to save these settings
Answer:
Flash memory is the correct answer to the given question .
Explanation:
The Flash memory is the a non-volatile memory memory that removes the information in the components known as blocks as well as it redesigns the information at the byte level.The main objective of flash memory is used for the distribute of the information.
We can used the flash memory for preserving the information for the longer period of time, irrespective of if the flash-equipped machine is enabled or the disabled.The flash memory is constructing the internet router that required to save the settings among the rewrites by erasing the data electronic and feeding the new data .When Adobe Photoshop was released for the first time? A: 1984 B: 1990 C: 1991 D: 1992
Answer:
B
Explanation:
What is output?
public abstract class Vehicle {
public abstract void move(int miles);
public void printInfo({
System.out.print("Vehicle ");
public class Car extends Vehicle {
private int distance;
public void move(int miles) {
distance = distance + miles;
public void printInfo() {
System.out.print("Car ");
}
public static void main(String args[]) {
Vehicle myVehicle;
Car myCar;
myVehicle = new Vehicle();
myCar = new Car();
myVehicle.printInfo();
myCar.printInfo();
}
}
Error: Car is not abstract and does not override abstract method move()
Vehicle
Vehicle Car
Error: Vehicle is abstract and cannot be instantiated
Answer:
The output is:
Error: Vehicle is abstract and cannot be instantiated
Explanation:
The following statement is causing this error:
myVehicle = new Vehicle();
Here an instance of Vehicle is being created. The name of the instance is myVehicle. new keyword is used to create an object or instance of class like here the instance myVehicle of class Vehicle is being created.
This instance cannot be created because the Vehicle is an abstract class. As you can see this statement public abstract class Vehicle.
So Vehicle class is declared with abstract keyword which means that this is an abstract class and cannot be instantiated. So Vehicle class is an abstract class and abstract class can only be used as a base class for its derived classes. Vehicle just provides with the basic functionality that its sub or derived class like Car can implement.
This class can be extended or inherited but no instance can be created of this class, as the Car class is used to extend the functionality of Vehicle class. Now you can create instance of Car class but NOT of a Vehicle class because it is an abstract class.
Write a program named Lab7B that will read 2 strings and compare them. Create a bool function named compareLetters that will accept 2 string variables as parameters and will return true if the strings have the same first letters and the same last letters. It will return a false otherwise.
Answer:
import java.util.*;
public class Lab7B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter first String");
String word1 = in.next();
System.out.println("Enter Second String");
String word2 = in.next();
System.out.println(compareLetters(word1,word2));
}
public static boolean compareLetters(String wrd1, String wrd2){
int len1 = wrd1.length();
int len2 = wrd2.length();
if(wrd1.charAt(0)==wrd2.charAt(0)&&wrd1.charAt(len1-1)==wrd2.charAt(len2-1)){
return true;
}
else{
return false;
}
}
}
Explanation:
Using Java Programming LanguageImport Scanner class to receive user inputPrompt user for two string and save in variablesCreate the compareLetters method to accept two string parametersUsing the charAt() function extract the first character (i.e charAt(0)). Extract also the last character (charAt(lengthOfString-1)Use if statement to compare the first and last characters and return true or falsePatrick Stafford's article argues that the growth of mobile phone usage "has given developers the ability to great robust and engaged communities" that help a game's chance of success.
a. true
b. false
Answer:
The statement is False.
Explanation:
In his article published on the 31st Aug 2010, Patrick suggests that a 100% penetration rate for any market is now possible due to the growth of the use of mobile phones.
The strategy of accessing the market using mobile ads, according to Patrick, is called Mobile Marketing.
In his article, Patrick provides statistics which help buttress his position that a good number of mobile phone users are ready to respond positively to mobile ads.
While it is implied that this concept has increased the chances of mobile games as a product being successful, nowhere in the article did Patric mention "games".
Cheers!
reate a class called Plane, to implement the functionality of the Airline Reservation System. Write an application that uses the Plane class and test its functionality. Write a method called CheckIn() as part of the Plane class to handle the check in process Prompts the user to enter 1 to select First Class Seat (Choice: 1) Prompts the user to enter 2 to select Economy Seat (Choice: 2) Assume there are only 5-seats for each First Class and Economy When all the seats are taken, display no more seats available for you selection Otherwise it displays the seat that was selected. Repeat until seats are filled in both sections Selections can be made from each class at any time.
Observe the things at Home in which you are using binary
conditions (ON/OFF) and Draw these things (any five).
Explanation:
All five things i can come up with her
1. Doors (we either open or close them)
2. Tap (we either open or close the valve)
3. Electric stove/cooker
4. The lid of containers
5. Shoes/ foot wears(we put them ON or OFF)
Instead of typing an individual name into a letter that you plan to reuse with multiple people, you should use a _______ to automate the process.
A. mail merge
B. data source
C. mailing list
D. form letter
ONLY ANSWER IF YOU'RE 100% SURE.
Answer:
A. Mail Merge
Explanation:
I had this question last year
If you face an investigation where dangerous substances might be around, you may need to obtain which of the following?
A. DANMAT certificate
B. DANSUB certificate
C. HAZMAT certificate
D. CHEMMAT certificate
Answer:
HAZMAT certificate
Explanation:
If you face an investigation where dangerous substances might be around, you may need to obtain a HAZMAT certificate.
Hazmat is the shortened form of the word "hazardous materials," which the United State Department of Transportation recognized as materials that could adversely affect people and also the environment. Hazmat certification is required to be obtained by workers who remove, handle, or transport hazardous materials. This comprises careers in transportation and shipping, firefighting and emergency rescue, construction and mining, as well as waste treatment and disposal. Workers who are also in manufacturing and warehouse storage may also come across hazardous substance or materials risks while on their jobs. Certification involves having the knowledge of the risks and safety measures for handling these materials.
Answer:
(C) HAZMAT certificate
Explanation:
HAZMAT stands for Hazardous Materials. These are materials that could adversely affect people and the environment. Examples are synthetic organic chemicals, heavy metals and radioactive materials. People who work in certain industries such as construction and mining, firefighting, waste treatment and disposal e.t.c, are required to have this certificate.
The certification involves training workers in these industries in the use of, risk involved, and way of handling of these materials when they are encountered at work.
CHALLENGE ACTIVITY 2.15.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya.
Answer:
Following are the program in Java language
import java.util.*; // import package
public class Main // main function
{
public static void main(String[] args) // main class
{
String l_name,f_name; // variable declaration
Scanner sc6=new Scanner(System.in); // scanner class
f_name= sc6.next(); // Read input
l_name=sc6.next(); // Read input
System.out.print(l_name); // display last name
System.out.print(","); // display comma
System.out.println(f_name); // display first name
}
}
Output:
Maya Jones
Jones, Maya
Explanation:
Following are the description of program
Declared a variable 'l_name","f_name" as the string type .Create the instance of scanner class i.e "sc6".Read the user input by using the instance "sc6" of the scanner class in the variable "l_name" and "f_name ".Finally by system.print() method we will display the value according to the format in the given question .Eight-queen's problem Consider the classic puzzle of placing eight queens on an 8 x 8 chessboard so that no two queens are in the same row or in the same column or on the same diagonal. How many different positions are there so that
no two queens are on the same square?
no two queens are in the same row?
no two queens are in the same row or in the same column?
Also, estimate how long it would take to find all the solutions to the problem by exhaustive search based on each of these approaches on a computer capable of checking 10 billion positions per second.
Answer:
12 solutions16,777,21640320 waysExplanation:
A) No two queens on the same square
Placing eight queens on an 8 * 8 chessboard has a total of 92 Separate solutions but unique 12 solutions
The total no of possible solutions using the computational method is
= 64! / (56! * 8! ) ~ 4:4 * 109
but since there are 12 unique solution out of the 92 therefore
B) No two queens are in the same row
= 8^8 = 16,777,216
C) No two queens are in the same row or in the same column
= 8! = 40320 ways
It will approximately take less than a second for a computer with the capability of checking 10 billion positions per second to find all the solutions
An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________ part of an established curriculum. Curricular practical training is defined to be alternative work/study, internship, cooperative education, or any other type of required internship or practicum that is offered by sponsoring employers through cooperative _____________ with the school. Students who have received one year or more of full time curricular practical training are ineligible for post-completion academic training. Exceptions to the one academic year requirement are provided for students enrolled in _____________ studies that require immediate participation in curricular practical training. A request for authorization for curricular practical training must be made to the DSO. A student may begin curricular practical training only after receiving his or her Form I-20 with the __________ endorsement.
Answer:
1. Student.
2. Integral.
3. Agreements.
4. Graduate program.
5. DSO.
Explanation:
An F-1 student may be authorized by the DSO to participate in a curricular practical training program that is an integral part of an established curriculum. Curricular practical training is defined to be alternative work/study, internship, cooperative education, or any other type of required internship or practicum that is offered by sponsoring employers through cooperative agreement with the school. Students who have received one year or more of full time curricular practical training are ineligible for post-completion academic training. Exceptions to the one academic year requirement are provided for students enrolled in graduate program studies that require immediate participation in curricular practical training. A request for authorization for curricular practical training must be made to the DSO. A student may begin curricular practical training only after receiving his or her Form I-20 with the DSO endorsement.
Please note, DSO is an acronym for Designated School Official and they are employed to officially represent colleges or universities in the United States of America. They are saddled with the responsibility of dealing with F-1 matters (a visa category for foreign students seeking admission into schools such as universities or colleges in the United States of America).
________ platforms automate tasks such as setting up a newly composed application such as a web service or linking to other applications.
Answer:
Cloud-based
Explanation:
Cloud based platforms are the various platforms that leverage on the power of cloud computing. With these platforms, users or businesses can access some or all features and files of a system without having to store these files and features on their own computers. Some of these platforms also automate tasks such as setting up various applications (such as a web service, a web application, database systems e.t.c) and/or linking them to other applications. Some of these platforms are;
i. Google Drive
ii. Amazon Web Services (AWS)
A project manager is responsible for (check all that apply)
A. addressing and seeking help on ethical issues
B. his/her client's company stock price
C. solving project technical issues and team conflicts
D. knowing and following rules and procedures related to the project
Answer:
The answers that are right are options A, C, and D.
Explanation:
Hope this helps!
Define a function begins_with_line that consumes a string and returns a boolean indicating whether the string begins with a dash ('-') or a underscore '_'. For example, the string "-Yes" would return True but the string "Nope" would return False. Note: Your function will be unit tested against multiple strings. It is not enough to get the right output for your own test cases, you will need to be able to handle any kind of non-empty string. Note: You are not allowed to use an if statement.
Answer:
The program written in python is as follows:
def begins_with_line(userinut):
while userinut[0] == '-' or userinut[0] == '_':
print(bool(True))
break;
else:
print(bool(not True))
userinput = input("Enter a string: ")
begins_with_line(userinput)
Explanation:
The program makes use of no comments; However, the line by line explanation is as follows
This line defines the function begins_with_line with parameter userinut
def begins_with_line(userinut):
The following italicized lines checks if the first character of user input is dash (-) or underscore ( _)
while userinut[0] == '-' or userinut[0] == '_':
print(bool(True)) ->The function returns True
break;
However, the following italicized lines is executed if the first character of user input is neither dash (-) nor underscore ( _)
else:
print(bool(not True)) -> This returns false
The main starts here
The first line prompts user for input
userinput = input("Enter a string: ")
The next line calls the defined function
begins_with_line(userinput)
NB: The program does not make use of if statement
Although the term podcasting has caught on, a more accurate term when it applies to video content is ________. a. tubecasting b. webcasting c. vcasting d. viewcasting
Answer:
The answer is option (c) vcasting
Explanation:
Solution
Vcasting for video content are more exact terms to use in place of podcast and podcasting.
Video content or vcasting: It refers any content format that attribute or contains video. common forms of video content are vlogs, animated GIFs, customer testimonials, live videos, recorded presentations and webinar.
Drug addiction occurs in
age groups, from a
variety of backgrounds.
A. young, narrow
B. all, narrow
C. all, wide
Answer:
ig the answer is C :) sorry if isn't correct
Copy the countdown function from Section 5.8 of your textbook. def countdown(n): if n <= 0: print('Blastoff!') else: print(n) countdown(n-1) Write a new recursive function countup that expects a negative argument and counts "up" from that number. Output from running the function should look something like this: >>> countup(-3) -3 -2 -1 Blastoff! Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.) If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero. Provide the following. The code of your program. Output for the following input: a positive number, a negative number, and zero. An explanation of your choice for what to call for input of zero.
Answer:
def countdown(n):
if n <= 0:
print('Blastoff!')
else:
print(n)
countdown(n-1)
def countup(n):
if n >= 0:
print('Blastoff!')
else:
print(n)
countup(n+1)
number = int(input("Enter a number: "))
if number >= 0:
countdown(number)
elif number < 0:
countup(number)
Outputs:
Enter a number: 3
3
2
1
Blastoff!
Enter a number: -3
-3
-2
-1
Blastoff!
Enter a number: 0
Blastoff!
For the input of zero, the countdown function is called.
Explanation:
Copy the countdown function
Create a function called countup that takes one parameter, n. The function counts up from n to 0. It will print the numbers from n to -1 and when it reaches 0, it will print "Blastoff!".
Ask the user to enter a number
Check if the number is greater than or equal to 0. If it is, call the countdown function. Otherwise, call the countup function.
Recursive functions calls themselves in a function, until a certain condition is met. It allows us to get rid of repetitive function calls. Hence, the recursive function for the action is given thus :
def countdown(n):
#initialize countdown function :
if n <= 0:
#blast off condition
print('Blastoff!')
else:
print(n)
countdown(n-1)
#recursion
def countup(n):
#initialize countuo function
if n >= 0:
#blast off condition
print('Blastoff!')
else:
print(n)
countup(n+1)
number = int(input("Enter a number: "))
#takes input from user
if number >= 0:
countdown(number)
else:
number < 0:
countup(number)
Learn more : https://brainly.com/question/20702793
How to fix the acount when it says "Uh oh, this account has been restricted because of an unusual amount of activity.
Answer:
Make sure that the email is verified. Also, usually sites do this when there are multiple log ins on multiple devices. It makes the site think that you are in multiple places at once making it seem suspicious. What i would do is clear cache and change the email and password associated with the account. If all fails contact brainly support
The critical path in a project network is:______ A. The Shortest path through the network. B. Longest path through the network. C. Network path with the most difficult activities. D. Network path using the most resources.
Answer:
B
Explanation:
The critical path in a project network is the longest path through the network. The option is B.
What is a project network?A project network is the diagram that shows the activities and sequences through which the project's various tasks must be completed.
The critical path is part of the project network that has the longest duration which directly impacts the planned project completion date, causing it to take longer to finish the project.
Therefore, the critical path in a project network is the longest path through the network.
Learn more about network here:
https://brainly.com/question/26199042
#SPJ2
Write a program that inputs a sentence from the user (assume no punctuation), then determines and displays the unique words in alphabetical order. Treat uppercase and lowercase letters the same.
Answer:
Following are the code to this question:
val={} #defining dictionary variable val
def unique_word(i):#defining a method unique_word
if i in val: #defining if condition to add value in dictonary
val[i] += 1#add values
else: #defining else block to update values
val.update({i: 1})#updating dictionary
s =input('Enter string value: ') #defining s variable for input string value
w=s.split()#split string value and sorte in w variable
w.sort() #sorting the value
for i in w: #defining loop for pass value in method unique_word
unique_word(i)#assign value and calling the unique_word method
for j in val:# defining for loop to print dictionary value
if val[j] == 1: #defining if block to check value is unique
print(j) #print value
Output:
Enter string value: my name is dataman
dataman
name
is
my
Explanation:
In the above python code, a dictionary variable "val" is declared, which is used in the method "unique_word" that uses if block to count unique word and in the else block it update its value. In the next step, s variable is declared, that the user input method to store the value and another variable "w" is defined that split and sort the string value. In the last step, two for loop is declared in which the first loop passes the string value and calls the method "unique_word", and in the second loop if block is defined that check unique value and prints its value.