1. Given a global list of users and password like the following, write a function (called login) that takes a user name and password and logs in the user if login is successful: - the user exists in the list - and the password is correct The function should return a True/False users = {'Jane': 'Password123@', 'John': 'Password123!'}
Q: Intelligent modems are capable of answering calls and making new ones. Who is responsible for making…
A: Intelligent modems are devices that combine the functionality of a traditional modem with additional…
Q: Your grandfather founded a software company that has fifty nodes. You fulfilled the requirement and…
A: Numerous types of network topology are described below: Star Structure Ring Topology for Transit…
Q: What role do you think automation plays in the emergence of the knowledge worker?
A: Automation refers to the use of technology and machines to perform tasks that were previously done…
Q: Classified DNS records. Provide examples and explanations for each. Using the same hostname for both…
A: Zone files, also known as DNS records, are instructions that reside on authoritative DNS servers and…
Q: DBAS data dictionary obligations?
A: DBAs are responsible for creating, documenting,updating, and securing data dictionaries for their…
Q: Explain why you think Visual Studio is a good choice. Provide instructions for making a simple…
A: Visual Studio is an IDE with a number of features that help to make the software development process…
Q: In order to get information, what are the benefits that may be gained through making phone calls?
A: There may be several advantages to phoning someone for information over the phone. First, it enables…
Q: What are the two most major benefits that software-defined networks have over conventional…
A: The Answer is in given below steps
Q: What features set real-time operating systems apart from their non-real-time counterparts?
A: An operating system (OS) is an essential software component that manages a computer's hardware…
Q: REQUIRED a. Prepare a system flowchart for Barsus steel factory payroll processing.. b. Prepare a…
A: Flowchart:- A flowchart is a diagram used to show the flow of control or data in a computer program…
Q: State the application of sigma-delta ADC. In an 8-bit Dual slope ADC, R=20 KN & C=0.01 µF, an analog…
A: An analog-to-digital converter ADC is used to convert an analog signal-like voltage to a digital…
Q: Convert the given ER diagram to Relational Data Model. Draw the complete diagram.
A: ER diagrams mainly comprise of Entity and its attributes Relationship which is association among…
Q: Classified DNS records. Provide examples and explanations for each. Using the same hostname for both…
A: Classified DNS records. Provide examples and explanations for each. Using the same hostname for both…
Q: How does the process of dynamic memory vary from that of rigid memory, and what are the differences…
A: Dynamic memory: It is a sort of PC memory that is intended for the transient storage of information…
Q: Do you have any firm opinions on email? How does data get sent from one location to another? Jot…
A: Email is a computerized message sent between at least two individuals or associations over the Web.…
Q: Email beliefs? How does communication flow between sites? List your knowledge. Why distinguish?…
A: Email is a common means of communication in today's digital world. With the rise of remote work and…
Q: What makes real-time unique in comparison to other OS
A: The answer to the above question is given below
Q: If it is possible for you to do so, would you be able to provide a brief overview of the key…
A: An operating system (OS) is a software program that manages computer hardware and software resources…
Q: Intelligent modems are capable of making calls, hanging up, and answering calls automatically. Who…
A: It could be possible to determine who is in command of the smart modem, depending on the facts. Logs…
Q: Classified DNS records. Provide examples and explanations for each. Using the same hostname for both…
A: Domain Name System (DNS) records are essential for the functioning of the internet. DNS records are…
Q: Does this definition of "Critical Evaluation" apply to the field of software development as well?
A: Critical evaluation is a method that consists of analyzing and analyzing what has been done and…
Q: Could you provide us the names of three such situations where discrete event simulation has been…
A: A model that simulates the behaviour of a real-world system is called a "simulator." This method…
Q: Talking to pupils about what information security is and the role that computer security jargon…
A: It is essential to have a discussion with the students about the meaning of information security and…
Q: When it comes to accomplishing our goals, how exactly would authentication help us? In this part,…
A: Authentication is the process of verifying the identity of a user, device, or system. It is a…
Q: Consider the Path-Goal Theory and the Leader-Member Exchange (LMX) Theory. Use real-life examples to…
A: Leadership is a critical component of organizational success, and over the years, scholars have…
Q: Why is it advantageous to store and analyse data on the cloud?
A: Hello student Greetings Hope you are doing great. Thank you!!!
Q: Kishiri developed an email system called KishiriChat. In this system, arriving messages are handled…
A: Kishiri developed an email system called KishiriChat. In this system, arriving messages are handled…
Q: A device that connects a phone line to a communication adaptor is referred to as a modem. What use…
A: Introduction: A modem, is a device that connects a phone line to a communication adapter, such as a…
Q: Which DBMS part manages concurrency?
A: A Database Management System or DBMS is a software system that is used to manage data stored in a…
Q: There are a number of reasons why the term "store-and-forward network" is no longer used in everyday…
A: In a store-and-forward network, a kind of communication network, messages or data are initially…
Q: How do computerized neural networks work? Please explain.
A: A computerized neural network is an algorithm for machine learning that mimics the form and function…
Q: In what way would you use the existing title block to build something new? Why?
A: Important details about the drawing or document, such as the title, author, date, and revision…
Q: In what ways does the data dictionary contribute to each of the DBLC's six stages?
A: Distributed databases are becoming more and more common in today's linked technological environment.…
Q: When discussing the kernel of an operating system, what are some of the most common parts to…
A: The kernel of an operating system is a vital component that controls the system's hardware and…
Q: How does one go about routing inside a wide area network (WAN)?
A: WAN router: A WAN router, also known as an edge router or border router, transports data packets…
Q: The use of cloud computing has the potential to help the environment in a number of different ways.…
A: Cloud computing is when data and computing services are stored and accessed over the internet. It…
Q: In cases when the web client needs access to restricted server resources, demonstrate how to build…
A: Networking significantly employs a broad range of protocols, which are often implemented at many…
Q: the kernel of an operating system, what are some of the most common part
A: The kernel is a fundamental component of an operating system that provides essential services and…
Q: Intelligent modems are capable of answering calls and making new ones. Who is responsible for making…
A: Answer : Modem : A modem (short for "modulator - de-modulator") enables devices connect to the…
Q: I was interested to hear from anybody who may have had any prior experience with virtual PCs in the…
A: The term "virtual learning" refers to a setting in which students study a curriculum delivered in a…
Q: You work for a huge corporation that utilizes a firewall to block public Internet access to its…
A: firewalls play a crucial role in securing computer systems and networks, and are an essential…
Q: You work for a huge corporation that utilises a firewall to block public Internet access to its…
A: The answer is given below step.
Q: Explain in detail how a challenge-response system for authentication is implemented. The added…
A: 1) A challenge-response system is a type of authentication mechanism that is designed to provide an…
Q: Do individuals who design databases need to be aware of any particular technique that, depending on…
A: Yes, database designers must be mindful of the unique technique that may effect a database's…
Q: What jargon do people often use to talk about the process of booting up the router?
A: `The boot-up procedure begins when a router is switched on for the first time. This step prepares…
Q: Your company has decided to deploy VoIP technology. The company places a high priority on QoS in…
A: The technology that allows for phone calls over the internet is known as VoIP, or phone over…
Q: racing the Recursion. Observe the recursive solution provided below and answer the following…
A: The given code is a Java implementation of a binary search algorithm. Binary search is a commonly…
Q: There is a comprehensive discussion on many facets of DNS queries, such as iterated and non-iterated…
A: Domain Name System (DNS) queries are a fundamental component of the internet infrastructure. DNS…
Q: When it comes to accomplishing our goals, how exactly would authentication help us? In this part,…
A: Authentication is critical to accomplishing our goals because it ensures that the right people have…
Q: A smart modem can dial, refuse, and answer incoming calls automatically. Who delivers the correct…
A: It could be feasible to identify the smart modem's teacher, depending on the situation. The call…
1. Given a global list of users and password like the following, write a function (called login) that takes a user name and password and logs in the user if login is successful:
- the user exists in the list
- and the password is correct
The function should return a True/False
users = {'Jane': 'Password123@', 'John': 'Password123!'}
2. Write a function called register that takes a user name and password and adds the user to the list if the user does not already exist in the list
The function should return a True/False
Put it all together:
3. Write a showmenu function that shows the following options and reads the choice from user and returns it:
1: register
2: login
0: logout
3. In the main section, based on the user's selected option, ask the required input (user name, passwords) and perform the requested operation.
4. Repeat the above until the user enters 0. (keep showing the menu that asks for another option)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- Write a function which splits the sentences in a dataframe's column into a list of the separate words. The created lists should be placed in a column named 'Split Tweets' in the original dataframe. This is also known as tokenization. Function Specifications: It should take a pandas dataframe as an input. The dataframe should contain a column, named 'Tweets'. The function should split the sentences in the 'Tweets' into a list of seperate words, and place the result into a new column named 'Split Tweets'. The resulting words must all be lowercase! The function should modify the input dataframe directly. The function should return the modified dataframe.Write a recursive function, displayFiles, that expects a pathname as an argument. The path name can be either the name of a file or the name of a directory. If the pathname refers to a file, its filepath is displayed, followed by its contents, like so: File name: file_path Lorem ipsum dolor sit amet, consectetur adipiscing elit... Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory, like so: Directory name: directory_path File name: file_path1 Lorem ipsum dolor sit amet... File name: file_path2 Lorem ipsum dolor sit amet... ...Write a recursive function, displayFiles, that expects a pathname as an argument. The path name can be either the name of a file or the name of a directory. If the pathname refers to a file, its filepath is displayed, followed by its contents, like so: File name: file_path Lorem ipsum dolor sit amet, consectetur adipiscing elit... Otherwise, if the pathname refers to a directory, the function is applied to each name in the directory, like so: Directory name: directory_path File name: file_path1 Lorem ipsum dolor sit amet... File name: file_path2 Lorem ipsum dolor sit amet... ... # Put your code here import os #module used to interact with operating system def displayFiles(pathname): #recursive function that takes a pathname as argument if (os.path.isdir(pathname)): #checks if specified path (argument) is an existing directory #for item in os.listdir(pathname): for content in os.listdir(pathname): #gets the list of all files and directories in the directory and…
- write a function with the following requirements*pass words from istream to ostream*if the word from the ostream contains an 'a', add brackets around the word*Do NOT use for or while loops, use iterators and stl algorithmn*assume all words are lowercase example: the istringstream with "they have a pet owl at home"should have the ostringstream as "they [have] [a] pet owl [at] home" example 2:"a b c d a b c" becomes "[a] b c d [a] b c" void bracket_to_a(std::istream &a, std::ostream &b) { //write code here}Write a function f which takes three pointers to int variables (a, b, c). Then it should:-Set the first variable to the sum of values of the variables (a + b + c).-Set the second variable to difference between maximum and minimum of values ( max(a,b,c) - min(a,b,c) )-Set the third variable to median of a, b, c.For example:if a = 5, b = 10, c = 2Then f(&a, &b, &c) should:Set a to 17 (that is the sum)Set b to 8 (that is max - min = 10 - 2)Set c to 5 (that is the median of 5, 10 and 2) NOTE: You are already provided a test main which checks your code for evaluation. DO NOT MODIFY IT or your answer will NOT be accepted. #include<stdio.h> // Write your code here... //////////////////////////////////////////// THIS IS THE TEST MAIN FOR YOUR PROGRAM// DO NOT MODIFY IT!!int main() {int a = 1;int b = 2;int c = 3;for (int i = 0; i < 2; i++) {f(&a, &b, &c);printf("%d\n", a);printf("%d\n", b);printf("%d\n", c);}return 0;}//////////////////////////////////////////…IN MAGICFS LANGUAGE The Fibonacci sequence begins like this: 0,1,1,2,3,5,8,13,21,... A number in the sequence is the sum of the previous two numbers in the sequence, with first two being 0 and 1. Implement a function named 'fibonacci' that expects a working value of an integer index, and returns the Fibonacci number at that position in the sequence. The index is zero-based. For instance, if given a value of 4, the function should return 3 because the sequence is 0, 1, 1, 2, 3, ... Use subroutines if necessary. Your answer will be evaluated for partial credit. Comments are encouraged.
- A common programming problem is maintaining a list in numerical or alphabetical order. For example, inventory part numbers are typically kept in numerical order, but telephone lists are kept in alphabetical order. For this exercise, write a function that inserts a three-digit part number in a list of part numbers. The list is maintained in increasing numerical order, and duplicate part numbers aren’t allowed. Allocate a maximum list size of 100 values, and use a sentinel value of 9999 to indicate the end of the list. For example, if the current list contains nine part numbers, the 10th position in the list contains the sentinel value. the insertion process for an original list of nine part numbers, using the following processing algorithm: To determine where in the list the new part number should be placed This is done by comparing the new part number to each value in the current list until a match is found, a part number larger than the new part number is located, or the end of the…A common programming problem is maintaining a list in numerical or alphabetical order. For example, inventory part numbers are typically kept in numerical order, but telephone lists are kept in alphabetical order. For this exercise, write a function that inserts a three-digit part number in a list of part numbers. The list is maintained in increasing numerical order, and duplicate part numbers aren’t allowed. Allocate a maximum list size of 100 values, and use a sentinel value of 9999 to indicate the end of the list. For example, if the current list contains nine part numbers, the 10th position in the list contains the sentinel value. the insertion process for an original list of nine part numbers, using the following processing algorithm: To determine where in the list the new part number should be placed This is done by comparing the new part number to each value in the current list until a match is found, a part number larger than the new part number is located, or the end of the…Write a function, Decode() that can analyse a list of card numbers. The function is constructed as follows:The function receives the string list (as in Question 3.1) as parameter and returns no value to the calling statement.When this function executes the following should happen:Each card number in the list should be analysed in turn to extract the encoded information in the following format:0318241215528881: Was issued by Diner’s club in 2018. The card expires on 24/12. The card is linked to a Credit account with account number: 15528881.It may be assumed that any year (YY) refers to the years 2000+.The information for each card number must be stored in one string variable. The variable must then be sent to the WriteFile() function (see Question 3.3 below) so that the result can be saved. The process repeats until each card number in the list is sent to the WriteFile() function.
- In C In C, strings are implemented by a contiguous sequence of characters, terminated by NUL character, otherwise known as ASCII code 0 (10'). CAPI, provides a function stropy for copying strings. The prototype of the function is given in the following: char* strepy(char* destination, const char* source); A) Write your own version of stropy that receives two character pointers and copies the source string into the destination string, character by character, until it reaches a null character. • The function stops when it reaches the end of the string, in which case it makes sure the destination string is properly terminated. • The function returns the original destination pointer as its return value. • The function assumes that source and destination strings are valid pointers. • In case either source or destination pointers are NULL, the function simply returns NULL. B) Write a small program that demonstrates the use of your version of strepy() function. • Define a character array and…Write a function that when given a URL as a string, parses out just the domain name and returns it as a string. Examples:domain_name("http://github.com/SaadBenn") == "github" domain_name("http://www.zombie-bites.com") == "zombie-bites"domain_name("https://www.cnet.com") == "cnet"Note: The idea is not to use any built-in libraries such as re (regular expression) or urlparse except .split() built-in function""" # Non pythonic waydef domain_name_1(url): #grab only the non http(s) part full_domain_name = url.split('//')[-1] #grab the actual one depending on the len of the list actual_domain = full_domain_name.split('.') # case when www is in the url if (len(actual_domain) > 2): return actual_domain[1] # case when www is not in the url return actual_domain[0] # pythonic one linerdef domain_name_2(url):For this c++ hw 1) Make a function that reads in 2 integers from the user. (call it Get2Ints) 2) Make a function that swaps 2 integers (call it swap) 3) Make a function swapAndMult that takes two ints as parameters, and one more int parameter which will be a multiplier swapAndMult should take the two parameters and multiply them by the multiplier. The parameters should return from the function with new values. swapAndMult should NOT print out the values. 4) Make a function that prints 2 integers. Call it Print2Ints Main function should: a) declare two integers and a multiplier b) read 2 integers from the user (use your function) c) print the values of the integers (use the function) d) swap the integers e) print the values of the integers f) read an additional integer (the multplier) from the user g) print the multiplier from the user (sometimes called 'echoing the input') h) call swapAndMult i) print the values of the integers