Write a program that keeps asking the user for a password

Assignment Help Computer Engineering
Reference no: EM131908106

Lab Assignment- Iterations

1. Write a program that keeps asking the user for a password until they correctly name it. Once they correctly enter the password, the program congratulates the user and tells them how many guesses it took. Call the program lastnamePassword.

Example (user input in italics)

What is the password?
monkeys
Incorrect. Guess again.
dishwasher
Incorrect. Guess again.
aardvark
Correct! You got the password, and it took you 3 guesses to get it correct.

2. Write a program that takes a string input from the user and then outputs the word, then the word minus the last letter, then the word minus the second to last letter, etc until it only prints the first letter. Name the program lastNameDown. ?

Extra: After going down to one letter, print the opposite back up to the full word - if you do this name your program lastNameDownUp.

Input: Computer
Output:
Computer
Compute
Comput
Compu
Comp
Com
Co
C

3. Write a program that asks the user for an integer input, and prints out all of the Fibbonacci numbers below that input. Each number in the Fibbonacci sequence is found by adding the two previous ( 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc) Name the Program lastNameFibb.

Enter an integer: 20

1
1
2
3
5
8
13

That is all of the Fibbonacci numbers below 20.

Reference no: EM131908106

Questions Cloud

Write a program to read in a collection of integer values : Write a program to read in a collection of integer values, and find and print the index of the first occurrence and last occurrence of the number 12.
Discuss about the implementation of erp systems : Selection and implementation of ERP systems is time consuming and very expensive. There are a number of published cases of failed ERP systems.
Find the periodic payments pmt necessary : Find the periodic payments PMT necessary to accumulate the given amount in an annuity account. HINT [See Quick Example 2.]
Describe the strategic management issue : Describe the strategic management issue(s) that this implies for an existing "traditional" insurance company and the insurance industry overall
Write a program that keeps asking the user for a password : Write a program that keeps asking the user for a password until they correctly name it. Once they correctly enter the password, the program congratulates user.
Develop solid budget to the success of any size organization : Just comment on the statement below. Do you agree and if so why? The need to develop a solid budget is key to the success of any size organization.
Compute the price of the bonds for maturity dates : Compute the price of the bonds for the maturity dates
Write an email to the chief hr officer : Analyze the situation. Use whatever tools may be available to you including the Internet, Brown & Beatty or other - Write either a letter of direction
Find amount of challenge in financial performance target : Refering to Citibank Indnesia case study answer the follwing "Highly achievable budget targets reduce the risk of gameplaying.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Design a single-bus structure for asc

Change the ASC instruction format to accommodate both preindexed and postindexed indirect addressing. Rewrite the microcode to accommodate those operations.

  Scripts_new directory and dir.txt file

Write down the following folder structure on C: drive of your computer: Scripts_New, Networking, User.

  Describe exact investigative techniques that you would use

Describe the exact investigative techniques that you would use to analyze the users' information, habits, and history for each program.

  Which data structure is the optimum one

When lots of inserts & deletes are involved. When you have no clue about how big the list would grow.

  How a box of caramel delites girl scout cookies

How to a box of Caramel deLites Girl Scout cookies Every spring you looking forward to buying a box of Caramel deLites Girl Scout cookies

  What is the default size of a text controls text box

What is the default size of a text control's text box? What is the difference between the size and maxlength attributes of input for text controls?

  Computing the fmin value

Compute the minimum: Graphically, Numerically with the f min search function

  Security policy document project

Analyze security requirements and develop a security policy

  Construct a fsm that models an oldfashioned soda machine

Construct a finite-state machine(FSM) that models an oldfashioned soda machine that accepts nickels, dimes, and quarters.

  Explain the type of protocol you would use in this situation

Your company has a network that contains several NetWare 4.11 servers and uses IPX as the routing protocol. Each of the network segments has minimum one NetWare server on it. Which of the following responds to a Get Nearest Server (GNS)request from..

  Design a payroll program which prompts the user to enter an

design a payroll program that prompts the user to enter an emplooyees hourly pay rate and the number pf hours worked.

  How to implement p and v on semaphores by using the test

Describe how to implement P and V on semaphores by using the test and set primitive in a busy wait scheme.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd