1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anton [14]
3 years ago
5

Password Checking Software to reset passwords often requires the user to enter the password twice, checking to make sure it was

entered the same way both times. Write a program in Python that contains functions/methods in it that can verify that the two passwords entered are correct. Your project should contain a method that asks the user to enter a password twice, then either tell the user that the two entries were not the same and then start the process over again. Or, if they are the same, tell the user that the new password was accepted. Additionally, the user is required to enter a password that meets specific security requirements. Proper Passwords are required to follow these rules: The password must be at least 12 characters long.

Computers and Technology
1 answer:
professor190 [17]3 years ago
3 0

Answer:

Attached answer as image. Please check the attachment.

Explanation:

getpass is standard library and used to enter password securely instead of plaintext.

You might be interested in
As faster processors are designed, a disparity has developed between the speed at which the CPU processes data and the speed at
pychu [463]
You are actually talking about the bias between Memory and CPU Speed.

There is always a trade-off between them, and for the importance of them, it's like neither or both.

It only depends on your requirements of them, if you only need 1 GB memory for data arrived, why do you need 2GB then? Same thing for CPU.
7 0
3 years ago
Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
soldi70 [24.7K]

Answer:

The program written in Python is as follows

Explanation:

4 0
3 years ago
Create a class named CarRental that contains fields that hold a renter's name, zip code, size of the car rented, daily rental fe
Anarel [89]

Answer:

Here is the corrected code: The screenshot of the program along with its output is attached. The comments are written with each line of the program for better understanding of the code.

CarRental.java

public class CarRental  {  //class name

//below are the data members name, zipcode, size, dFee, days and total

String name;  

int zipcode;

String size;

double dFee;

int days;

double total;  

public String getName()  {  //accessor method to get the name

return name; }

public int getZipcode()  { //accessor method to get the zipcode

return zipcode; }

public String getSize() {  //accessor method to get the size

return size; }

public int getDays() {  //accessor method to get the days

return days;  }

public CarRental(String size)  {  //constructor of CarRental class

if(size.charAt(0)=='e')  // checks if the first element (at 0th index) of size data member is e

     dFee = 29.99;  // sets the dFee to 29.99

  else if(size.charAt(0)=='m')  // checks if the first element (at 0th index) of size data member is m

     dFee = 38.99;  // sets the dFee to 38.99

  else   // checks if the first element (at 0th index) of size data member is f

     dFee =43.50;  // sets the dFee to 43.50

   }

public void calculateTotal(int days) {  //method calculateTotal of CarRental

total = dFee*days;  }  //computes the rental fee

public void print()   {  //method to display the total rental fee

System.out.println("Your rental total cost is: $" + total);  } }

Explanation:

LuxuryCarRental.java

import java.util.*;

public class LuxuryCarRental extends CarRental {  //class LuxuryCarRental that is derived from class CarRental

public LuxuryCarRental(String size, int days) {  // constructor of LuxuryCarRental

super(size);}   //used when a LuxuryCarRental class and CarRental  class has same data members i.e. size

public void calculateTotal() {  //overridden method

super.calculateTotal(days); // used because CarRental  and LuxuryCarRental class have same named method i.e.  calculateTotal

dFee = 79.99;  //sets the rental fee at $79.99 per day

total = dFee;  }  //sets total to rental fee value

public void print(){  //overridden method

   int chauffeur;  // to decide to include chauffeur

Scanner keyboard = new Scanner(System.in);  //used to take input from user

System.out.println("Do you want to add a chauffeur for $200? Enter 0 for"

+ " yes and 1 for no");  // prompts the user to respond to the option of including a chauffeur at $200 more per day

chauffeur = keyboard.nextInt();   //reads the input option of chauffeur from user

if(chauffeur==1)  //if user enters 1 which means user does not want to add a chauffeur

total = dFee;  //then set the value of dFee i.e.  $79.99  to total

else  //if user enters 0 which means user wants to add a chauffeur

total = dFee + 200;  //adds 200 to dFee value and assign the resultant value to total variable

System.out.println("Your rental total cost is: $" + total);  }  } //display the total rental fee

UseCarRental.java

import java.util.*;

public class UseCarRental{ //class name

public static void main(String[] args){ //start of main() function body

String name, size; // declare variables

int zipcode, days; //declare variables

Scanner keyboard = new Scanner(System.in); // to take input from user

System.out.println("Enter total days you plan on renting: "); //prompts user to enter total days of rent

days = keyboard.nextInt(); // reads value of days from user

System.out.println("Enter your name: "); //prompts user to enter name

name = keyboard.next(); //reads input name from user

System.out.println("Enter your billing zipcode: "); // prompts user to enter zipcode

zipcode = keyboard.nextInt(); //reads input zipcode from user

System.out.println("Enter the size of the car: "); // prompts user to enter the value of size

size = keyboard.next(); //reads input size from user

CarRental economy = new CarRental(size); //creates an object i.e. economy of class CarRental

economy.calculateTotal(days); //calls calculateTotal method of CarRental using instance economy

economy.print(); //calls print() method of CarRental using instance economy

LuxuryCarRental fullsize = new LuxuryCarRental(size, days);  //creates an object i.e. fullsize of class LuxuryCarRental

fullsize.calculateTotal();  //calls calculateTotal method of LuxuryCarRental using instance fullsize

fullsize.print(); }} //calls print() method of LuxuryCarRental using instance fullsize      

4 0
3 years ago
In every organization, workers receive and sendinformation daily. The flow of this information should be____________.upward and
Aleks [24]

Answer:

upward and downward

Explanation:

4 0
3 years ago
The internet maybe best compared to what
attashe74 [19]
The internet can be compared to many stuff, such as a world wide web, or a huge box with stuff and you put in what you want and it comes out! 
6 0
3 years ago
Other questions:
  • Which of the following could be defined as a general-purpose computing device that enables workers to create, manage, store, sea
    12·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • The practice of using similar but not identical domain names is called _____. domain spoofing domain masquerading domain tasting
    13·1 answer
  • A user reports that he cleared a paper jam and now cannot print. The technician reseats the paper and then prints a test page fr
    14·1 answer
  • Calculate the total and average number from 1 to 100<br>​
    12·1 answer
  • What is multimedia computer system​
    7·1 answer
  • Consider a Huffman’s Algorithm that uses a variable-length encoding scheme to compress the original text: BIRTHDAY to determine
    7·1 answer
  • What is the difference between the byte and short data types in Java?
    7·1 answer
  • Mario kart is mercedes lol
    13·2 answers
  • if we intend to include a servo motor as an actuator, what feature should we include when selecting a microcontroller?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!