PYTHON QUESTION 1 MULTIPLE CHOICE A.. A file that contains reusable code is called a: a. module c. function b. hierarchy chart d. namespace B. A global variable: a. is defined inside the main() function b. cannot be modified inside a function c. cannot be accessed from within a function d. is defined outside of all functions
Q: Knowledge of social networking and the principles that underpin it To begin, let us define…
A: Social Networking: Modern social networking sites provide the bare essentials of communication.…
Q: What kind of tree do you get when you use the Java Standard Library to create an ordered data tree?
A: Answer: A binary tree is an established tree that is also an arranged tree (a.k.a. plane tree) in…
Q: Why is it important to use networking commands in creating a computer network
A: answer: importance of networking commands in creating computer network
Q: How do Agile Methodologies and Traditional Approaches differ?
A: I have provided the difference in step 2.
Q: Give at least three examples of propositional logic and apply the truth table application, where…
A: Propositional logic is the simplest form of logic where all the statements are made by propositions…
Q: Proofs: Construct proofs to show that the following symbolic arguments are valid. Commas mark the…
A: Given: ¬N↔¬O, ¬O→¬N→P ∴P To do: Construct the proof of the given argument.
Q: What are some of the drawbacks of using UDP streaming?
A: User Datagram Protocol (UDP) is a communications protocol that is primarily used to establish…
Q: Countermeasures and security services are available to help protect information. Find out who would…
A: Most individuals utilize information in various ways, and this information can be stored in some…
Q: Draw derivation tree for string : bbabb For context free grammar S -> bSb | a | b
A: HI THEREI AM ADDING DERIVATION TREE AS PER REQUIREMENT BELOWPLEASE GO THROUGH IT THANK YOU
Q: Is it correct to suggest that data structures and algorithms have lost their relevance in the era of…
A: Answer Introduction It is possible to store and arrange data in a data structure by naming the…
Q: Create a small application that accepts ordering information for customized sundaes in an ice-cream…
A: Code: #include <bits/stdc++.h> using namespace std; int main() { // desipaly menu…
Q: In this phase you’ll be writing code within the methods of your classes to make the tests pass.…
A: Code: BankAccount.java import java.util.*; public class BankAccount { //All the instance…
Q: A hard drive stores data in well-organized patterns of ones and zeros. With the aid of a diagram…
A: Please find the Explanation of hard drive with diagram below in second and third step:-
Q: Draw the derivation tree for string "bab" for the given context free grammar S -> bSb | a | b
A: HI THEREI AM ADDING DERIVATION TREE FOR ABOVE STRING BELOWPLEASE GO THROUGH ITTHANK YOU
Q: Provide an explanation of Machine Learning and why it matters to businesses today. Analytical CRM…
A: Machine learning- (ML) is a sort of artificial intelligence that allows software applications to…
Q: Make the case for object-oriented analysis in the design of an information system.
A: The solution to the given question is: Object-oriented analysis is very important for the…
Q: If you were asked by a hospital to design a patient monitoring system, you would have been given all…
A: Specification of Software Requirements (SRS): The programming system requirements specification…
Q: e Toolbox i
A: At the point when the cursor is moved over the tool stash in the Visual Studio IDE, the tool kit…
Q: Definition of Artificial Intelligence Define and describe your chosen Artificial Intelligence…
A: Artificial intelligence (AI) Artificial intelligence (AI), the capacity of an advanced computer or…
Q: Non-integrated information systems present what kinds of difficulties and issues?
A: Thanks to some service design model, every employee or user can access information regarding…
Q: What is the bare-bones configuration of a Wi-Fi network, and how does it work? What is their…
A: Introduction: BISS, or essential service set, is a network architecture that is also referred to as…
Q: Examine the benefits and drawbacks of Integrated Enterprise Information Systems. Give two examples…
A: IIS (Integrated Information System) is a term used to describe a system that integrates information…
Q: The distinction between sequential access and direct access is as follows: Allow me to give you an…
A: Direct Access: The value is directly available through the index in this type of access. Arrays are…
Q: Is there a service or countermeasure that would be ideal for countering information assurance?
A: Countermeasure: A method or instrument for negating or offsetting another. A physician's most…
Q: Security management methods and their underlying concepts should be properly analyzed?
A: Answer:
Q: It's because computers have become so powerful in recent years. For the last several decades,…
A: The Answer is in step-2.
Q: Use Python to calculate how many different passwords can be formed with 6 lower case English…
A: HI THEREI AM ADDING PYTHON CODE AS PER REQUIREMENT BELOWPLEASE GO THROUGH ITTHANK YOU
Q: In a kindergarten school, On Independence Day, 10 kids must stand in a line with number of roses in…
A: code: #include <stdio.h>int main(){int i,j,k;int arr[9];for(i=0; i<9; i++){ printf("enter…
Q: In software development, what are the four most important qualities? Your thoughts on how to make…
A: The following are the four most important software development characteristics: Efficiency: The term…
Q: Is it feasible to increase productivity by 10% if the issue is 10% Essential Complexity and 90%…
A: Introduction: FORTRAN is quickly gaining popularity as a programming language. You've been given the…
Q: TCSEC is divided into four divisions. Each division should be expressed separately.
A: Let us see the answer:- Introduction:- The TCSEC divides the country into four divisions: D, C, B,…
Q: Write an algorithm and draw a flowchart to check if a number is negative or positive or equal to…
A: Answer
Q: Where does "good enough" come from when it comes to software development?
A: Encryption: We need to discuss why good application development is necessary, as well as the crucial…
Q: How has the rise of mobile devices affected IT professionals?
A: In summary, mobile technology has promoted and improved businesses communication by ensuring that…
Q: Explain three (3) important problems in interface design.
A: Basic: In user interface design, the aesthetic aspects through which consumers interact with a…
Q: What are the signs that Visual Studio has found a syntax error?
A: According to the question the syntax error only when comes if made a mistake when you writing the…
Q: Write a program using if-else statements that convert from lbs to kg and vice versa. The input…
A: Weighting System Weight is the measure of the relative mass a body has or the amount of matter.…
Q: Which information system flaws need to be addressed and how should we go about doing that?
A: Introduction: People utilize corporate productivity software, such as word processing, tablet, and…
Q: What does the term "software" imply? Are there any instances of how Application Software may be…
A: Collection of instructions that describes to the computer what to do is known as a software.
Q: What is computer integration?
A: Integration: Integration is combining smaller parts into a single system that functions as a whole.…
Q: In technical terms, what's the difference between polymorphism and abstraction?
A: Abstraction: Abstraction helps a programmer consider broad terms rather than particular ones while…
Q: 1. For the tar command, write what each option below does: O -c -V -f -Z -X
A: As per Bartleby policy, I am allowed to answer only 1 question. Kindly post others separately. “tar”…
Q: How does the infrastructure-based wireless network concept work? The network isn't in infrastructure…
A: Given: Base stations, also known as access points, are deliberately located over a given area in…
Q: What is the difference between two-tiered and three-tiered application architectures, and where do…
A: Two-tier and three-tier architectures: The client and database tiers are the two tiers (Data Tier)…
Q: A disk size of 200 tracks receives the requests for the blocks for I/0. operation. No. of blocks…
A: Introduction: Disk Scheduling Algorithms: Disk scheduling is done by operating systems to schedule…
Q: Can you classify the four main software development traits? If you think the other four traits…
A: Maintainability: The term "passionate" has become so overused and oversaturated that it now appears…
Q: Write a single python program for the following A) Create an integer array with 15 values (assign…
A: Step-1: Start Step-2: Create an array a of elements [1,2,3,4,5,6,7,8,9,10,11,13,14,16,17] Step-3:…
Q: Examine the advantages of agile development over traditional, structured techniques.
A: The Answer is in step-2.
Q: Examples of when Batch and OLTP processing may be used in a transaction processing cycle (TPS) are…
A: Transaction Processing Cycle (TPS): Transaction processing systems capture and process data…
Q: Given a rod of length n inches and a table of prices p¡ for I = 1, 2, ..., n, use dynamic…
A: // A Dynamic Programming solution for Rod cutting problemclass RodCutting{/* Returns the best…
PYTHON
QUESTION 1 MULTIPLE CHOICE
A.. A file that contains reusable code is called a:
a. |
module |
c. |
function |
b. |
hierarchy chart |
d. |
namespace |
B. A global variable:
a. |
is defined inside the main() function |
b. |
cannot be modified inside a function |
c. |
cannot be accessed from within a function |
d. |
is defined outside of all functions |
C. A return statement:
a. |
must be coded within every function |
b. |
can be used to return a local variable to the calling function |
c. |
can be used to allow the function to modify the value of a global variable |
d. |
can only be used once in each function |
Code Example 4-1
def get_username(first, last):
s = first + "." + last
return s.lower()
def main():
first_name = input("Enter your first name: ")
last_name = input("Enter your last name: ")
username = get_username(first_name, last_name)
print("Your username is: " + username)
main()
D. Refer to Code Example 4-1: If the user enters ‘Lopez’ for the first prompt in main() and ‘Maria’ for the second prompt, what will display?
a. |
Maria.Lopez |
b. |
maria.lopez |
c. |
lopez.maria |
d. |
Lopez.Maria |
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- find informatiion on below given questions 1 Writing and saving a Python file using Script Mode in python 2 how to write clear readable code in python 3 Running a Python file. 4 about how to get user input in python 5 about if and else clauses in python 6 about function in python 7 Writing your own functions in pyton 8 Creating a number guessing game in python 9 how to use the tkinter library in python 10 Making own A Sketch game in python 11 how to put an application in its own window in python 12 how to attach functions in pythonCreat a program which can process multiple groups. These groups are on the input separated by ’=\n’. Every group starts with a first line that contains the name of the group and the lines after contain the information about the students in the same way as the text file. The program needs to be written in Python, and needs to make use of functions and input parsers. With the input 1bErik Eriksen__________4.3 4.9 6.7Frans Franssen________5.8 6.9 8.0=2bAnne Adema____________6.5 5.5 4.5Bea de Bruin__________6.7 7.2 7.7Chris Cohen___________6.8 7.8 7.3Dirk Dirksen__________1.0 5.0 7.7 The output should be: Report for group 1bErik Eriksen has a final grade of 6.0Frans Franssen has a final grade of 7.0End of reportReport for group 2bAnne Adema has a final grade of 6.0Bea de Bruin has a final grade of 7.0Chris Cohen has a final grade of 7.5Dirk Dirksen has a final grade of 4.5End of reportDefine a function deleteProp that has 2 parameters: obj an object to update keyName, a string - a key name to delete from the object deleteProp should delete the property with the key of keyName. deleteProp should return the object that was passed in (not a “copy” or different object with the same key/value pairs) example const wallet = { color: 'Black', hasCash: true } deleteProp(wallet, 'color'); => { hasCash: true } const house = { sqFt: 1500, isOccupied: true } deleteProp(house, 'isOccupied'); // => { sqFt: 2000 } javascript
- can you please separate the classes of this program program must embrace modular programming technique and should be menu-driven. Functions of similaroperations can be grouped (or kept alone) and stored as separate C files. Header files are to be stored separately as .h files #include <stdio.h> #include <stdlib.h>#include <string.h> struct vacc{ char vaccName[15]; char vaccCode[2]; char country[15]; int qty; float population; }v[10]; // Function Declarations void create_inventory(); void update_vacc_qty(); int search_vaccine(); void display_vaccine(); // Main Function starts here int main() { int ch;do {printf("\n 1:create inventory");printf("\n 2: display vaccine info ");printf("\n 3: search vaccine");printf("\n enter your choice (0 to exit):");scanf("%d",&ch); switch (ch){case 1: create_inventory();break;case 2: display_vaccine();break;case 3: search_vaccine();break;default : break;} }while(ch!=0);return 0; } void create_inventory() { int option = 1;…This program should be designed and written by a team of students. Here are somesuggestions:o One student should design function main, which will call the other functions inthe program. The remainder of the functions will be designed by other membersof the team.o The requirements of the program should be analyzed so each student is givenabout the same work load.o The parameters and return types of each function should be decided in advance.o The program can be implemented as a multi-file program, or all the functions canbe cut and pasted into the main file.Here is the assignment: Write a program that can be used by a small theater to sell tickets forperformances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. Theprogram should display a screen that shows which seats are available and which are taken.For example, the following screen shows a chart depicting each seat in the theater. Seats thatare taken are represented by an * symbol, and seats that are…Create a function in Python named my_watermark. The function should take in two parameters: Name of an image file Message - This is text that should be watermarked onto the image Your function should save the watermarked image with the name of the original file with a “_wm” appended to the of the name before the period.
- GDB and Getopt Class Activity activity [-r] -b bval value Required Modify the activity program from last week with the usage shown. The value for bval is required to be an integer as is the value at the end. In addition, there should only be one value. Since everything on the command line is read in as a string, these now need to be converted to numbers. You can use the function atoi() to do that conversion. You can do the conversion in the switch or you can do it at the end of the program. The number coming in as bval and the value should be added together to get a total. That should be the only value printed out at the end. Total = x should be the only output from the program upon success. Remove all the other print statements after testing is complete. Take a screenshot of the output to paste into a Word document and submit. Practice Compile the program with the -g option to load the symbol table. Run the program using gdb and use watch on the result so the program stops when the…Use Python for this question: Write a standalone function partyVolume() that takes accepts one argument, a string containing the name of a file. The objective of the function is to determine the a Volume object that is the result of many people at a party turning the Volume up and down. More specifically: the first line of the file is a number that indicates the initial value of a Volume The remaining lines consist of a single character followed by a space followed by a number. The character will be one of ‘U” or ‘D’ which stand for “up” and “down” respectively. The function will create a new Volume object and then process each line of the file by calling the appropriate method of the Volume object which changes the value of the Volume. The function then returns the final Volume object. Guidelines/hints: This is a standalone function, it should NOT be inside (indented within) the class. It should be listed in the module after the Volume class and without indentation. Note that…Use Python for this question: Write a standalone function partyVolume() that takes accepts one argument, a string containing the name of a file. The objective of the function is to determine the a Volume object that is the result of many people at a party turning the Volume up and down. More specifically: the first line of the file is a number that indicates the initial value of a Volume The remaining lines consist of a single character followed by a space followed by a number. The character will be one of ‘U” or ‘D’ which stand for “up” and “down” respectively. The function will create a new Volume object and then process each line of the file by calling the appropriate method of the Volume object which changes the value of the Volume. The function then returns the final Volume object. Guidelines/hints: This is a standalone function, it should NOT be inside (indented within) the class. It should be listed in the module after the Volume class and without indentation. Note that…
- *System Programming (C language) Add to the previous shell the following features: Input file redirection using < Output file redirection, both truncating (>) and appending (>>) #include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/wait.h> #define MAX_INPUT_LENGTH 1024#define MAX_ARG_LENGTH 128 void execute_command(char *args[]) {pid_t pid = fork(); if (pid == 0) {// Child processif (execvp(args[0], args) == -1) {perror("Shell");}exit(EXIT_FAILURE);} else if (pid < 0) {// Forking failedperror("Shell");} else {// Parent processwaitpid(pid, NULL, 0);}} int main() {char input[MAX_INPUT_LENGTH];char *args[MAX_ARG_LENGTH];char *token; while (1) {printf("MyShell> ");fgets(input, sizeof(input), stdin); // Remove newline characterinput[strlen(input) - 1] = '\0'; // Tokenize the inputtoken = strtok(input, " ");int i = 0;while (token != NULL) {args[i++] = token;token = strtok(NULL, "…HELP WITH C++ PASTE INDNETED CODE PLZZ YOU HAVE TO USE THE GIVEN MAIN FUNCTION TO TEST YOUR ANSWER Q4: Continue with House class:a) Copy the previous program to a new file. Implement comparison operator overload for comparing the price of House object. b) Overload the operator > to output boolean, which support auto type conversion. c) Overload the operator <= to output boolean, which support auto type conversion. d) Overload the operator == to output boolean, which support auto type conversion. e) Overload the operator != to output boolean, which support auto type conversion. (Hint: need one argument constructor) Use following main() to test your class. int main(){House a("1234 qcc st, Bayside, NY",1000000); House b("5678 cuny st, Bayside, NY",900000); cout<<(a>b)<<endl; // print 1 cout<<(a<=b)<<endl; // print 0 cout<<(a==b)<<endl; // print 0 cout<<(b!=a)<<endl; // print 1…Project 8 Specifications Using OOP, write a C++ program that will read in a file of names and a file of birth years. The file of names is called Names.txt and the file of birth years is called BirthYear.txt. Both input files should be located in the current directory of your program. The list of names in the Names.txt file corresponds to the list of birth years in the BirthYears.txt file. This means:The first name in the names.txt file corresponds to the first birth year in the birthyear.txt file. The second name in the names.txt file corresponds to the second birth year in the birthyear.txt file...and so on.Read in and store the names into an array of 30. Next read in and store the birth years into another array of 30 integers.Sort the arrays using the selection sort or the bubblesort code found in your textbook. List the roster of names in ascending alphabetical order displaying their birth years beside their names.Next, prompt the user to enter a birth year. Validate this…