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
never [62]
3 years ago
5

50 PTS

Computers and Technology
1 answer:
8_murik_8 [283]3 years ago
8 0

import java.util.Scanner;

public class JavaApplication46 {

   public static boolean passwordCheck(String pass){

       String alphanum = "abcdefghijklmnopqrstuvwxyz1234567890";

       boolean legit = true;

       if (pass.length()>= 8){

           for(int i = 0; i < pass.length(); i++){

               if (alphanum.indexOf(pass.charAt(i)) != -1 && legit != false){

                   legit = true;

               }

               else{

                   legit = false;

               }

           }

       }

       else{

           legit = false;

       }

       

           return legit;

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter a password: ");

       String password = scan.next();

       System.out.println(passwordCheck(password));

   }

   

}

I hope this helps!

You might be interested in
Can someone please explain binary addition to me? i have a test tomorrow yikes
umka2103 [35]

Answer:

its easy

Explanation:

there are are 5 main rules

in binary there are 2 number 0 and 1

0 + 0 = 0

0 + 1 = 1

1+0=1

1+1=0 carry 1

e . g

1 1 1

1 0 1 0 1 0

+ 1 1 0 0 1 0

-------------------------

1 1 1 1 1 0 0

*in bold are the ones that you need to carry.

in decimal there are 10 possible numbers 0- 9

when you do 1 + 9 it becomes 10, this can be done easily, however if you do 1 + 9 in a table like above, you will get 0 for the first column and you will carry 1 to the next column .

in binary is the same idea but using on 2 numbers 1 and 0

e.g

1

1

+ 9

----------

1 0

*in bold are the ones that you need to carry.

hope it helps and good luck in your exam.

3 0
3 years ago
, , ,g d,t ,dt m,dt ymtd
maks197457 [2]

Answer:ummm me confused

Explanation:

4 0
3 years ago
Katarina is deciding whether to buy a desktop or a laptop computer. What will most likely help Katarina make her decision?
Gnesinka [82]
Laptops are portable decides , while desktops remain in one plcae
4 0
3 years ago
Read 2 more answers
WILL GIVE BRAINLIEST IF DONE CORRECT
Juliette [100K]

Answer:

import sys

#account balance

account_balance = float(500.25)

##prints current account balance

def printbalance():

  print('Your current balance: %2g'% account_balance)

#for deposits

def deposit():

 #user inputs amount to deposit

 deposit_amount = float(input())

 #sum of current balance plus deposit

 balance = account_balance + deposit_amount

 # prints customer deposit amount and balance afterwards

 print('Deposit was $%.2f, current balance is $%2g' %(deposit_amount,

balance))

#for withdrawals

def withdraw():

 #user inputs amount to withdraw

 withdraw_amount = float(input())

 #message to display if user attempts to withdraw more than they have

 if(withdraw_amount > account_balance):

   print('$%.2f is greater than your account balance of $%.2f\n' %

(withdraw_amount, account_balance))

 else:

   #current balance minus withdrawal amount

   balance = account_balance - withdraw_amount

   # prints customer withdrawal amount and balance afterwards

   print('Withdrawal amount was $%.2f, current balance is $%.2f' %

(withdraw_amount, balance))

#system prompt asking the user what they would like to do

userchoice = input ('What would you like to do? D for Deposit, W for

Withdraw, B for Balance\n')

if (userchoice == 'D'): #deposit

 print('How much would you like to deposit today?')

 deposit()

elif userchoice == 'W': #withdraw

 print ('How much would you like to withdraw today?')

elif userchoice == 'B': #balance

 printbalance()

else:

 print('Thank you for banking with us.')

 sys.exit()

6 0
3 years ago
Read 2 more answers
Which command should you select to delete a comment?
Nana76 [90]
This completely depends on what command shell/program you are using
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is the process of transferring data in a continuous and even flow, which allows users to access and use a
    12·1 answer
  • Your co-worker is at a conference in another state. She requests that you
    9·1 answer
  • Which type of account typically has low liquidity?
    7·1 answer
  • . what action does the following a default operator perform? int a, b, c; a = b + c;
    14·1 answer
  • When you need to move data over long distances using the internet, for instance across countries or continents to your amazon s3
    5·2 answers
  • Anyone want to talk? it can honestly be about any subject :)
    5·1 answer
  • Write a function writel that will write the length of a side of a square. If only one argument is passed to the function, it is
    10·1 answer
  • Activity #2
    13·1 answer
  • Once you select a theme, you__________ change the theme’s individual elements independently of each other.
    12·1 answer
  • In a DTP project, Fiona is looking for a way to make a page layout attractive to readers. Help Fiona pick the correct word to co
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!