1 name ('Mary') 2 password = 'swordfish' 3 if name == Mary: 4 5 6 7 8 = print ('Hello, Mary') if password == 'swordfish': print (Access granted.') else: print ('Wrong password.') I
Q: 150. Write a C# Sharp program to create a new list from a given list of integers removing those…
A: logic:- create a list and insert above elements. Create another list. Iterate previous list and…
Q: What is the IEEE-754 single precision real number after encodingt the real decimal number -76.0625?…
A: Answer the above question are as follows
Q: side by side, what is the overall failure rate of this "twin system"? In general, if our targeted
A: Solution - In the given question, we have to tell how many systems A are needed.
Q: Write a program that prompts the user to enter five test scores and then prints the average test…
A: Introduction: In this question, we are asked to write a C++ program to print the average of 5 test…
Q: I Want a flow cart for this question.
A: Flowchart is a step by step process in which the steps are connected with the flows. In this…
Q: Please help me solving each of these with java ... a. Defines and initializes a floating-point…
A: Program Approach:- Question 1 Step 1: Create class with the name of AreaofCircle Step 2: Declare…
Q: The aim of this assignment is to perform two tasks by employing the concept of Stack and Queue Data…
A: Explanation: Task 1: public class stack { int[] stack; public int top; // the top of the…
Q: Write the definition of a Java method named longest 4 that receives four parameters of type String…
A: ALGORITHM:- 1. Take input for the four string parameters in a function. 2. Return the value of the…
Q: Using JAVA code: Please make a GUI that will convert infix to postfix expression. In the…
A: Java was used to write the program . In the steps that follow, kindly review the source code and…
Q: Assume you have a method i 5Su b 5 tr ing which checks if one word is a substring of another. Given…
A: These question answer is as follows
Q: How could i make an array that lets say has every month then i have another array that has a double…
A: Let's say there are two arrays as follows: month = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",…
Q: Please write a loop that prints multiples of 3 from 300 down to 3. This will be a java programming…
A: The following are steps that need to be taken for the given program: We will create a for loop with…
Q: After the SHR instruction is executed in the code sequence below, what is the final value for AL?…
A: The final value for AL: MOV AL, 1010_1111b SHR AL,2 while doing the shift right instruction highest…
Q: reate sequence diagram based on the given flow
A: A sequence diagram which refers to the Unified Modeling Language (UML) diagram that illustrates that…
Q: Thank you for the quick respond. Even with the 'static' on line 5, I am getting error. Please see…
A: #define is the correct way to declare the size of an array. Given below is error free program using…
Q: A virus or other malware can impact which of the three tenets of information systems security…
A: Virus /malware impact:- When our private data is transmitted across a media, malware is affected. In…
Q: Q23. The following program negates a 2D array. int sum_array(int a [N] [M]) { int i, j; for (i=0;…
A: The solution requires to have a substantial amount of concept how matrixes ( i.e. 2D arrays) are…
Q: Why am I getting "not found" and "NameError" ? Here is the code with my keys redacted. def auth():…
A: The above code looks fine. But make sure to install the tweepy library with- $pip install tweepy and…
Q: Apply gaussian random walk(walking in a random direction with each step of length 1. i.e. each time…
A: There is no definitive answer to this question since it depends on the randomness of the walk.…
Q: n affine cipher has the form c = (am+b) mod n. Suppose m is an integer between 0 and 25, each…
A: Introduction: in this question, there are two sub-parts related to cipher and given c = (am+b) mod n…
Q: So here I have 2 tables and I need help understanding the basics of joins. I have developed some…
A: I have given solution below.
Q: Threads of a process share the O a. Program Counter O b. Process Stack OC. Register Values Od. Code…
A: Here is the complete explanation of the above problem. See below steps.
Q: How to Reading and Writing gzip compressed files in perl language.
A: Reading and Writing gzip compressed files in perl language:-
Q: Use RSA algorithm to encrypt the plaintext "3" use following parameters p= 11, q= 3, e = 13.
A:
Q: Write a program that uses UNIX system calls to “ping-pong” a byte between two processes over a pair…
A: Unix system: A multiuser, multitasking operating system (OS) with the trademarked name "Unix" is…
Q: Suppose we are given two n-element sorted sequences A and B that should not be viewed as sets (that…
A: The first step is to determine if the lengths of A and B are equal. If they don't, we add 0s to the…
Q: Could you do typing the query here please?
A: To find customers with different order numbers, you need to join the table dbs211_orders with…
Q: 12.3 LAB: Array of squares - Iw/sw Given an array of four integers, write a program that populates a…
A: Hello student
Q: Please provide indentation for code or a screenshot of code written
A: Please find the answer below :
Q: Consider the following binary 3 5 8 5 1 2 10) 1 7 6 a) List the nodes visited with a preorder…
A:
Q: Q.9 Compare SVM and NN.
A:
Q: 20) Write a script that reads the content of a file. Then print the number of four-letter words in…
A: The following are steps that need to be taken for the given program: We open the text file (ex:…
Q: In the film Office Space Lumberg forces his employees work on weekends. Thus type of negotiated…
A: This is regularly known as the "emblematic collaboration" technique or the "activity approach".
Q: 1. The game begins by welcoming the player and asking their name. Input verification is not needed.…
A: Python which refers to the high-level, general-purpose programming language. Its design which also…
Q: List any 4 communication technologies that are used by end users and mention the applications that…
A: Communication Technology:- Communication technology is the transfer of messages (information) among…
Q: 3. Consider two Boolean functions, f(x,y,z) and g(x,y,z). Use truth tables to prove the two…
A: Truth Table for f(x,y,z)=x(y'z+y)+x'(y+z')' : x y z x’ y’ z’ y’z y’z+y x(y’z+y)…
Q: After the following statements have been executed, how many Car objects will exist, not counting…
A: JAVA GARBAGE COLLECTION: Here, Garbage means unreferenced object.It is the process of reclaiming the…
Q: Q.8 What are the applications of fuzzy logic?
A:
Q: I need help with creatufb this HTML. Thank you. Create an HTML form that has one input text field…
A: HTML:- HTML is a markup language that establishes the organizational structure of your content. HTML…
Q: What is blockchain technology and How will blockchain technology impact industries or companies?
A: Answer : Blockchain technology is a technology which basically stores all the transactional records.…
Q: Step 1: Takes five inputs from the user Step 2: Calculates the average of all the five values Step…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT
Q: State and explain types of information security threats
A: It is crucial to first comprehend what cyber security threats are. Cyber security threats are any…
Q: shows the complete anagram.cpp program. use a class to represent the word to be anagrammed. Member…
A: complete anagram.cpp program. use a class to represent the word to be anagrammed. Member functions…
Q: With the increase in the use of Information Systems, it is even more quite appropriate for…
A: Every organization actually takes the time to monitor what their employees are doing on their…
Q: cpp + _nclude sing namespace std; nt main() float sum-0;//initalize the decimal sum to 0 float…
A: There are syntax errors in the code shown in the above image. Example: The expression for (int_0; 5;…
Q: Help me solve this with a Java program that declares and initializes two integers (assign values…
A: Introduction: In this question, we are asked write a complete JAVA program that as per the sub parts…
Q: Build a Turing Machine (TM) that receives as input two strings of 1's separated by the symbol # and…
A: q0 is the initial stateq5 is the final state represents Blank symbol
Q: Explain Ada Boost algorithms in detail
A: The AdaBoost algorithm is discussed in detail below Happy to help you ?
Q: Using python Twenty students were asked to rate on a scale of 1 to 5 the quality of the food in…
A: Using python we create an code in which Twenty students were asked to rate on a scale of 1 to 5 the…
Q: Write a python code that does the following: - Asks student to enter his name - Ask them to…
A: This question answer is as follow,
What is causing this error
Step by step
Solved in 3 steps with 2 images
- private LocalDate date private Doctor doctor, private boolean status private String appointmentNumber. What to do 1. (5) Provide the following: • A fully parameterized constructor. Setter and getter for all attributes. 2. (5) Add a toString method. It should return a String similar to the following (Note: you should only add the doctor's name): Expected Output: Date: 2022-04-01 Doctor Name: Dr. AhmedObject Oriented Programming: 213COMP, 214COMP (Feb-2022) Assignment- I [10 marks] Academic honesty: O Only pdf file accepted & student ID, will be your upload file. O Student who submit copied work will obtain a mark of zero. O Late work or attach file by email message not allowed. Q1: Write the signature for a method that has one parameter of type String, and does not return a value. Q2: Write the signature for a method that has two parameters, both of type Student, and returns an int value. Q3: Write the constructor's headers of the followings? new Student (202101156, “Ahmed"); new Address(51, "jazan university","CS&IT" ); new Grade(true, 505235600, 4.5); Q4: a) Write a class Student that define the following information: name, stid , age. b) Explain a mutators (setters) and accessors(getters) methods for each attributes(fields). c) Add three constructors: • with empty constructor. one parameter constructor (name of student) two parameters constructor (name and stid) d) Create two…Observer pattern The PhoneModel class stores a phone number as a list of digits, and the Keypad class has this method: public void simulateKeyPresses(int numKeyPresses)(0 that allows the user to enter digits one at a time then save each digit in the list. The Screen wants to respond to each key being entered. Make the model notify the observers whenever a new digit is entered for the phone number. The first observer prints the newest digit out to the screen The second observer prints "Now dialing 12345678901.." out to the screen (where the number is the number the model has). Only the Screen class can print to the screen The model must be decoupled from the Other classes.
- class Polynomial: class TermNode:def __init__(self, coefficient: int, exponent: int) -> None:"""Initialize this node to represent a polynomial term with thegiven coefficient and exponent. Raise ValueError if the coefficent is 0 or if the exponentis negative."""if coefficient == 0:raise ValueError("TermNode: zero coefficient")if exponent < 0:raise ValueError("TermNode: negative exponent") self.coeff = coefficientself.exp = exponentself.next = None def __init__(self, coefficient: int = None, exponent: int = 0) -> None:"""Initialize this Polynomial with a single term constructed from thecoefficient and exponent. If one argument is given, the term is a constant coefficient(the exponent is 0).If no arguments are given, the Polynomial has no terms. # Polynomial with no terms:>>> p = Polynomial()>>> print(p._head)None>>> print(p._tail)None # Polynomial with one term (a constant):>>> p = Polynomial(12)>>> p._head.coeff12>>>…Project in Java programming language : Choose an enterprise and do a business description of it. 1-2 pages. Create all classes for entities. All classes must have at least a constructor, get and set methods for all private variables and a toString method. Create classes also for connection entities (e.g. orders, reservations, etc.) All information should be saved in files. When opening the program, all information from files must be loaded in array lists. Use an array list for every class. The program must have at least one menu where the user can choose the operations to work. You should at least have one class that inherits from another class. You should have at least one interface that is extended by at least 2 classes. You must use the interface methods in your program. You are allowed to use the GUI for this project. If not use JOptionPane You are allowed to use databases, instead of files.Home Task: 1. Implement the following class and test its methods: - numerator: int - denominator: int Fraction + Fraction(numerator: Int, denominator: int) + getNumerator(): int + getDenominator(): int + setNumerator(numerator: Int): void + setDenominator(denominator: Int): void + to String(): String + add(fraction: Fraction); void + sub(fraction: Fraction); void + multiplication (fraction: Fraction); void + division(fraction: Fraction): vold
- # Coding - Simulate a robot Write a program that simulates the movements of a robot. The robot can have three possible movements: turn right turn left advance The robot is placed on a hypothetical infinite grid, facing a particular direction (north, east, south, or west) at a set of `{x,y}` coordinates,e.g., `{3,8}`, with coordinates increasing to the north and east. Create a Class `Robot` that contains a method `execute` which given a number of instructions will calculate the robot's new position, and the the direction in which it is pointing. ## Example The letter-string "RAALAL" means: Turn right Advance twice Turn left Advance once Turn left yet again Say a robot starts at `{7, 3}` facing north. Running this stream of instructions should leave it at `{9, 4}` facing west. ## Inputs and Outputs The argument of the `execute` is `string` in the format `X Y BEARING COMMANDS`. The method should return a one-liner `string` in the format `X Y BEARING`. In the…public class Password {String password;String SPECIAL_SYMBOLS = "!@#$%^&*"; public boolean specialSymbol(char symbol){//TODO: Return true if symbol is a special symbol. otherwise return false.// HINT: use indexOF method to check if symbol is in the string SPECIAL_SYMBOLS.return false;} Please read the todo statement of the java code, thank you.class Pt: def init_(self, x, y): self.x X P(3,4) self.y = y def _str__(self): x, y = self.x, self.y return f'P({x},{y})' True 18 # add coordinate-wise def add_(self, other): nx = 13 14 ny = 15 16 return 17 Pt(1, 1) b = Pt (2, 3) с %3D а + b d = b + Pt(5, 6) print (c) print ( isinstance (d, Pt)) print (d) %3D
- Talking: Heba Abde QUESTION 1: Implement class myTime, this class should: 1) Encapsulate information about the hours (integer), minutes (integer), seconds (integer), AM PM (String) 2) Forbid invalid times, where the following criteria should be considered: - hours are in the range [1 – 12], default is 12. - minutes are in the range [0 – 59], default is 0. - seconds are in the range [0-59], default is 0. - AM PM can only be either “AM" or "PM", default is "AM" If any forbidden value entered, you should set the value to default value. 3) Two different constructors (default and parameterized) 4) A print function that will print the time as (hours : minutes : seconds PM/AM) Example: 02:45:30 PM 6) implement function ticktack, which adds one to the seconds, notice that if seconds is 59 and you add one, it should become 0 and the minutes should be incremented by one, also, if after incrementing minutes by one it becomes 60, it should be set to 0 and hours must be incremented by 1, if after…Enter the name of Stock: Oracle Corporation Enter the symbol of Stock: URCL Enter the previous closing price: 34.5 Enter the current price: 34.35 Stock name: Oracle Corporation Stock symbol: ORCL Stock ID: 59 Price-change percentage: - 0.434782608695648 Challenge Question - Using GregorianCalendar and Date classes: (Use the GregorianCalendar class) Java API has the Date class and GregorianCalendar class in the java.util package, which you can use to obtain the current date with specific details like current year, current month, current day of a date and so on. Write a program to perform these tasks: 1. Display the current year, month, and day. 2. Display the current date by using the to String() method from the Date class. 3. Display the current time-which is used to display the number of milliseconds- by using getTime() method from the Date class. We will use it in the step 17. 4. - Display the current year by using get(GregorianCalendar.YEAR) method from to GregorianCale class. 5-…Enter the name of Stock: Oracle Corporation Enter the symbol of Stock: URCL Enter the previous closing price: 34.5 Enter the current price: 34.35 Stock name: Oracle Corporation Stock symbol: ORCL Stock ID: 59 Price-change percentage: - 0.434782608695648 Challenge Question - Using GregorianCalendar and Date classes: (Use the GregorianCalendar class) Java API has the Date class and GregorianCalendar class in the java.util package, which you can use to obtain the current date with specific details like current year, current month, current day of a date and so on. Write a program to perform these tasks: 1. Display the current year, month, and day. 2. Display the current date by using the to String() method from the Date class. 3. Display the current time-which is used to display the number of milliseconds- by using getTime() method from the Date class. We will use it in the step 17. 4. - Display the current year by using get(GregorianCalendar.YEAR) method from to GregorianCale class. 5-…