A=......................? B Your Comment: .?
Q: Write a program that tracks how much calorie the user burns in total in a day and reports if the…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: not handwritten An undirected graph is defined to be biconnected if it is connected and has no…
A: An undirected graph is defined to be biconnected if it is connected and has no articulation points.…
Q: Implement programme provides an example of how to carry out these tasks. The string "Hello world" is…
A: Answer the above program are as follows
Q: I’m trying to create a program in assembly language for a Microchip PIC microcontroller to simulate…
A: It looks like the program you have written is in the assembly language for the Microchip PIC…
Q: What types of relationships between values can you test with relational operators?
A: Lets see the solution.
Q: UNIX ---Complete the command so that it returns "CORRECT". If the command is already complete, enter…
A: We are asked (in UNIX command language) to complete the command so that it returns "CORRECT". If…
Q: Question 2 Given that a language is both Turing-Recognizable and co-Turing-Recognizable what can we…
A: The solution is given below for the above-given question;
Q: .3 (Contacts Database) Study the books.sql script provided in the ch17 examples folder's sql…
A: 1. import postgreSQL library in jupyter notebook import psycopg2 if the modules is not present in…
Q: Judging rules can be difficult – even for an objective computer program. In football (or soccer as…
A: We may list several characteristics that appealing computer games appear to share, despite the fact…
Q: Code of the following Thanks for the help, but I'm not finished yet. Here are my instructions for…
A: We write the above program without errors with explanation in the code:
Q: For the state diagram in the following figure. If the present state is 01, and the input is 0, the…
A: Below I have provided a solution for the given question.
Q: 7. Make a circuit with a blinking LED and a button. The button makes the LED blink faster when…
A: The LED’s legs are connected to two pins on the Arduino: ground and pin 13. The component between…
Q: make Algorithm for Las Vegas method for generating random integer numbers within the interval[, u).…
A: in: lower bound (0 ≤ ); upper bound u ( < u ≤ + m)out: random integer r ( ≤ r ≤…
Q: Let a digit be one of the ten decimal digits 0,1,2,3,4,5,6,7,8,9. Draw the state diagram for a DFA…
A: The answer of above question is below. I hope this will helpful for you..
Q: Can a Java program have two different variables named number and Number?
A: Answer is given below
Q: Create a Java program that will display the student's information. The program should perform the…
A: Step-1: StartStep-2: Declare variable fName and take input from userStep-3: Declare variable mName…
Q: Assignment 5 Draw Data Flow diagram similar in figure below passenger Use Press the buttons Wait…
A: In this question, it is asked to convert the given activity diagram to a data flow diagram. This…
Q: Color the following map of Pakistan using the constraint satisfaction problem. We Have 5 variables…
A: In this question, it is asked to provide the solution for the given problem of constraint…
Q: Assume you are developing a service that will be used by up to 1,000 client apps to obtain simple…
A: answer is
Q: The LRU page replacement algorithm is too expensive to implement accurately in practice. True False
A: Dear Student, The answer to your question is given below -
Q: 7. List the ordered pairs in the equivalence relations produced by these partitions of…
A: Below I have provided a Solution for the given question.
Q: between any two US cities (excluding cities in Alaska and Hawaii) can be approximated by the…
A: Dear Student, The required answer to your question is given below -
Q: A scientist has developed a mathematical model for a physical process, and he wants to check how…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Mike is a database administrator who has recently joined an online car rental company who captured…
A: Dear Student, The answer to both your questions is given below -
Q: 2. What does PWM stand for, and how does it work?
A: Introduction PWM is a way to deal with control straightforward contraptions with a computerized…
Q: 1. What is the difference between a digital SIGNAL and an analog SIGNAL?
A: Answer is given below
Q: Instructions: Answer the following questions without writing any code on your computer. Save your…
A: In this question, it is asked to calculate the number of comparisons and swaps for the given data…
Q: IN C++ please Given an infix expression, write a program to store it in an expression tree. Your…
A: Given a string representing infix notation. The task is to convert it to an expression…
Q: how is k-means np hard problem if dimensionality of data is at least 2. Explain mathematically
A: In this question we need to explain how k-means is np hard problem if dimensionality of data is at…
Q: one of Counters Design methods is Select one: a. Ripple Ob. tripple c. asynchronous d. None of the…
A: Below I have provided a solution for the given question.
Q: Write code to identify an element in a sorted array of n numbers that has been rotated an unknown…
A: Java Program: import java.util.Scanner; class RotatedArray{ // function for searching an element…
Q: Following question _Qestion 2 – Simple Machine-Learning Function Java Program A Learning Function…
A: Here, The code to implement the required machine-learning function is as follows:
Q: What Is floating-point notation?
A: Lets see the solution.
Q: You have an infinite number of 4 types of lego blocks of sizes given as (depth x height x width):…
A: Python code for given problem is followed on:
Q: Problem Statement Write a C Program that determine the number of occurence of a particular character…
A: Step-1: StartStep-2: Declare variable N and tempStep-3: Take input from user for NStep-4: Initialize…
Q: Make shortest path algorithm in computer network in C++ ,(Make the code organized) , explain the…
A: In this question, it is asked to provide the shortest path algorithm in a computer network in C++.…
Q: The following program stores the elements of an array in reverse order. Please complete the program.…
A:
Q: Describe two transition-system models of computation and one model that computes functions S* ® S*…
A: In this question we have to understand two transition system models of Computation and one model…
Q: Hidden State For s as defined in the lecture, where so is the null vector, take the sentence…
A: A zero vector or null vector which refers to the one it is a vector that has a zero magnitude and no…
Q: Find the relation between the following functions: f(n) = log n and g(n) = Vn. (Square root for…
A: According to our guidelines, we are allowed to solve only the first question. Please post the other…
Q: Define the term Minimum cardinalit?
A: Cardinality:- Cardinality is the state in which it determines the number of other activities that…
Q: Mapping: Create relational schemas for the ER diagram given below. Indicate clearly the primary and…
A: The processes to generate the relational schemas for the provided Entity Relationship diagram are…
Q: LAB, 16.17 LAB: Swapping variables Define a method named swapValues that takes an array of four…
A: Algorithm: START Put the first component in a temporary variable. Put the second element in…
Q: 7. Consider the following piece of pseudocode: new Queue q ENQUEUE[2, q] for 1 ≤ i ≤ 5 do ENQUEUE[i…
A: A queue is a data structure that follows the First-In-First-Out (FIFO) principle. This means that…
Q: Write an ARMv8 assembly function to compute the sum of square of first n odd natural numbers using…
A: An ARMv8 assembly function to compute the sum of the squares of the first n odd natural numbers…
Q: Write a C++ program that requests any number of input integers from user, sorts and displays the…
A: Here I have created the recursive function mergeSort(), to sort the given array in ascending order.…
Q: What Is A literals?
A: Lets see the solution.
Q: The function of the following program is to output the book name and price entered by the user.…
A: Given:
Q: Write the following algorithm in python for the below operations on the Queue Q a. Insert (E, Q)…
A: Dear Student, The required code for your program along with implementation and expected output is…
Q: Post your answer to the Question (100-200 words): Read the below given statement and answer the…
A: I believe that the increasing reliance on mobile devices, the growing demand for mobile apps, and…
Step by step
Solved in 2 steps with 1 images
- please fix the following , when user log in with debit# and pin and choose 1 for deposit and you choose negative amount , it accept it, i need it to only accpet positive amount import tkinter as tkfrom datetime import datetime, timedeltaclass ATM: def __init__(self): self.accounts = {} def create_account(self): # Get user inputs first_name = first_name_entry.get() last_name = last_name_entry.get() dob = dob_entry.get() address = address_entry.get() debit_card = debit_card_entry.get() while len(debit_card) != 16 or not debit_card.isdigit(): debit_card = input("Invalid debit card number. Enter debit card number (16 digits): ") pin = pin_entry.get() while len(pin) != 4 or not pin.isdigit(): pin = input("Invalid pin. Enter 4-digit pin: ") # Create account and update GUI self.accounts[debit_card] = {"first_name": first_name, "last_name": last_name, "dob": dob,…if the user click on create account or on login with empty text info (without entering the desired info like name and DOB before clicking on create account for example ) the program crashes, can you figure out why and fix it import tkinter as tkfrom datetime import datetime, timedeltaclass ATM: def __init__(self): self.accounts = {} def create_account(self): # Get user inputs first_name = first_name_entry.get() last_name = last_name_entry.get() dob = dob_entry.get() address = address_entry.get() debit_card = debit_card_entry.get() while len(debit_card) != 16 or not debit_card.isdigit(): debit_card = input("Invalid debit card number. Enter debit card number (16 digits): ") pin = pin_entry.get() while len(pin) != 4 or not pin.isdigit(): pin = input("Invalid pin. Enter 4-digit pin: ") # Create account and update GUI self.accounts[debit_card] = {"first_name":…if [ $(id -u) -eq 0 ];then read -p "enter username:" username read -s -p "enter password:" password egrep "^$username"/etc/passwd>/dev/null if [ $? -eq 0];then echo "$username exists!" exit 1 else pass=$(perl -e 'print crypt($ARVG[0], "password")' $password) useradd -m -p "$pass" "$username" [ $/ -eq 0 ] && echo "user has been added to system!" || echo "Failed to add a user!" fi else echo "Only root may add to the system" exit 2 fi * recheck the code if this is valid syntax for account management or suggest /do another user account management shell script that runs in unix terminal and please attache the output at the end
- Review the following program that extracts the email server domain name. >>> data = 'From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008 ' >>> atpos = data.find('@') >>> print(atpos) 21 >>> sppos = data.find(' ',atpos) >>> print(sppos) 31 >>> host = data[atpos+1 : sppos] >>> print(host) 1. Adapt the program to extract the user name (stephen.marquard) and Copy+Paste the code in the answer2. Run the adapted program and include a full window screenshot with system time and date in the answer.Please answer properly with output screenshot must Where is the error in this code? from telethon.sync import TelegramClientfrom telethon.tl.functions.messages import GetDialogsRequestfrom telethon.tl.types import InputPeerEmptyimport os, sysimport configparserimport csvimport time re="\033[1;31m"gr="\033[1;32m"cy="\033[1;36m" def banner():os.system('clear')print("ok") cpass = configparser.RawConfigParser()cpass.read('config.data') try: api_id = cpass['cred']['id'] api_hash = cpass['cred']['hash'] phone = cpass['cred']['phone'] client = TelegramClient(phone, api_id, api_hash)except KeyError: os.system('clear') banner() print(re+"[!] run python3 setup.py first !!\n") sys.exit(1) client.connect()if not client.is_user_authorized(): client.send_code_request(phone) os.system('clear') banner() client.sign_in(phone, input(gr+'[+] Enter the code: '+re))os.system('clear')banner()chats = []last_date = Nonechunk_size = 200groups=[]result =…Look the following code and describe the difference between commands "read -p" and "read -s -p" #!/bin/bash# Register 5 users for user_no in {1..5}; do echo "Registering user no: $user_no" read -p "Enter username: " username read -s -p "Enter password: " password # do something here to check password validity # do something here to register the userecho -e "\n" done
- MCQ: Which class waits for requests to come from the clients. It performs some operation based on that request, and then possibly returns a result to the client? DatagramSocket class ServerSocket class DatagramPacket class Socket classCreate an application that uses a socket connection to allow a client to specify a file name of a text file and have the server send the contents of the file or indicate the file does not exist. The server must contain a text based password file ("user name" & "password"). The client must pass a valid username and password to establish a connection with the Server (see Note 1). Notes: 1. A much better approach would be to encrypt the password file. The Java Cryptographic Extension (available since JDK 1.4) provides an API. Java Cryptography Architecture Reference Guide (JCA Guide): on oracle Introduction, Code Examples - Computing a Message Digest Object (i.e. one-way hash; using SHA-1) -Please ensure that it works need clear help compiling properly with no errors.create a simple c++ code that seeks for users log in credentials (email and password) using try throw catch and if else inside
- Rewrite the same code with a different logic make sure you have the same output. <?php$cookie_name = "user";$userID = $_COOKIE[$cookie_name];if(!isset($_COOKIE[$cookie_name])){ echo "Please login in first!<br>"; exit();} include "dbconfig.php";$conn = new mysqli($hostname, $username, $password, $dbname) or die($conn->connect_error);$name = $_POST['name'];$description = mysqli_real_escape_string($conn, $_POST['description']);$term = mysqli_real_escape_string($conn, $_POST['term']);$enrollment = $_POST['enrollment'];//Query course name$Rid = '';$userGivenFacultyID = $_POST['Fid'];$userGivenRoom = $_POST['Rid'];$queryRid = "SELECT Rid FROM TECH3740.Rooms WHERE CONCAT(Building,Number) like '%$userGivenRoom%' ";$resultRid = mysqli_query($conn, $queryRid);$rid_row_ct = $resultRid->num_rows;if($rid_row_ct = 1){while($ridRow = $resultRid->fetch_assoc()){$Rid = $ridRow['Rid'];}} $queryRoomSize = "SELECT Size FROM TECH3740.Rooms WHERE Rid = $Rid";$resultRoomSize =…1) Create a new user account. The username should be your first name. The primary group of this user account should be your partner's first name. 2) Create another user account. The name must, this time, be randomly generated. This account should be part of the following groups: users, sys & root. 3) Explain how to run the command 'ping 8.8.8.8' under the user created in Step 1. 4) Write a pipeline to the number of accounts associated with the group 'users'. 5) Write a pipeline to only allow the user created in Step 1 to execute the command 'top'.voting application app c# it would ask if the person would like to login as a admin or voter if admin 1. Add/Delete Candidate and automatically generate candidate ID. 2. Add/Delete Voters and automatically generate voter ID. 3. ask for an user and password if voter 1. it would ask them to login and register 2. Allow voters to vote using registered ID and an ID which has not voted yet. 3. When voter ID is deleted, its vote will also be deleted.