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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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