Use the readline() method to obtain a value from the user

Assignment Help Basic Computer Science
Reference no: EM13271352

Write a code segment that will analyze a numeric value provided by the user to determine if he or she is a newborn, a child, a teenager, or an adult. Make sure to include the following in your code:

· Display the message "Please enter your age in years" to the user.
· Use the ReadLine() method to obtain a value from the user.
· Use the Parse() method to convert the user's value to an appropriate data type for numeric comparisons.
· Check to be sure the user entered a value greater than or equal to 0 and less than or equal to 150.
· Use ElseIf statements to determine the stage of life associated with the user's input. An input value of 0 indicates the user is a newborn. An input value of 1 up to but not including 13 is a child. An input value of 13 up to but not including 20 is a teenager. An input value of 20.0 or more is an adult.

Reference no: EM13271352

Questions Cloud

Leading consultants for a number of patients : Doctors are specialists in some branch of medicine and may be leading consultants for a number of patients, not necessarily from the same ward.
Compute the focal length of the concave mirror : A light bulb is placed 22.3 cm in front of a concave mirror. Calculate the focal length of the concave mirror
How far is the base of the smokestack from the life ring : A diver beneath the surface of water in a lake looks up at 27 degrees from the vertical to see a life ring floating on the surface. How far is the base of the smokestack from the life ring
Computing the degree of ionic character of each bond : Calcite (CaCO3) has two types of bond. (covalent and ionic) a) Demonstrate which is the stronger by calculating the degree of ionic character of each bond
Use the readline() method to obtain a value from the user : Write a code segment that will analyze a numeric value provided by the user to determine if he or she is a newborn, a child, a teenager, or an adult. Make sure to include the following in your code:
What was the rate of price appreciation for year : Electronics, Inc. common stock returned a nifty 22.68% rate of return last year. The dividend amount was $0.25 a share which equated to a dividend yield of 0.84%. What was the rate of price appreciation (capital gain) for the year?
Compute the equivalent values for the bonds : Anhydrite (CaSO4). Calculate the equivalent values for the bonds in anhydrite and comment on the differences between the two minerals.
What is the filter output if the bandwidth is b hz : A signal x(t)=sinc(200*pi*t) is sampled (multiplied) by a periodic pulse train. Find and sketch the spectrum of the sampled signal. Explain whether you will be able to reconstruct x(t) from these samples.
What was the average annual growth rate : At the end of the year 2002, the firm paid a dividend of $1.35. At year-end 2009, it paid a dividend of $1.84. What was the average annual growth rate of dividends for this firm?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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