Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a fortune teller program which will get the birth year of the user as input and tell them at which year they will get

Create a fortune teller program which will get the birth year of the user as input and tell them at which year they will get rich! Follow rules below,

Birth year

Output

Sorry, if you are not one yet, you will never be a rich person

1980-1999

A random year between 2025-2035

2000-2014

A random year between 2040-2055

2015-2021

A random year between 2055-2070

>2021

There is a problem with your birth year

You should also print how many years left to date year from now on. Check sample below. Sample output

Welcome to the great fortune teller! Please input your birth year to learn the year that you will be a rich person: 1986 After 13 years, at 2034, you will be a rich person!

Only use functions and methods we learned up to (and including) this week.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions