Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this part of the project, main purpose is to get the secret code from the computer. There are five questions to be answered. In

image text in transcribed
image text in transcribed
image text in transcribed
In this part of the project, main purpose is to get the secret code from the computer. There are five questions to be answered. In each question, user will face a problem and all problems are related to the solution of the previous problem. Before solving the problem, it is not possible to move to the next question, First question will start with the day the user was born. That means each code is specific for each user. When user reaches and solves the fifth problem he/she will get the key code Here are the questions 1) Please enter the numeric day of your birthday between 1 and 7 (example Mon Tue 2)user enters rumber that is not between 1 and 7, then print error and ask number again. Let's assume the result of question 18 X. 2) What is the xth power ofn (e. n")Here is a number that can only be computed as follows Get the initial letter of your name in uppercase (A to Z others will not be tested). Look at the decimal number that stands for that better in Ascil table and take the mod of it by 4 Hint: There is no need to look at the ASCII table, actually. Both in Labs and MT1, we have shown you the trick For example, Oguzhan is my name. Tritial letter of my name is O. The number stands for that letter in Ascil table 79. mod 79,4) 3. Hence. 3. Ako you have to print both the letter and the value non screen. In order to print in correct way, examine the example below. Let's assume the result of question 2 sy 3) How many prime numbers do edist untilyy is included) Hint: A prime number is a whole number greater than 1 that has no positive divisors other than 1 and itselt For example, there are 9 prime numbers until 27 Let's assume the result of question 3 & 2". 4) Enter element of Fibonacci series Mint: Fibonacci series is a series of numbers in which each number (Fibonacct number is the sum of the two preceding numbers. A port of the series i 1.1.2.3.5.&_ For example, if then w Mint Othelement of Fibonacci series assumed to be 0. Let's assume the result of question 4 is w 5) Finally enter your age and compute wage(wis multiplication sign, which is the desired keycode Remember that program should continue until user enters a correct answer for each question. For Sth question, age should be between 1 and 100it is not you are expected to print the error message of it is not correct and ask again After 5 question is correctly answered, print "Congratulations! You found the codel The code is... You're expected to implement the functions below (of course with some parameters and proper return types): ask First Question askSecond Question ask Third Question askFourth Question askFifth Question In addition to these methods you can also implement more functions. Hint: Please be careful about the messages on the output of the sample. If you think your algorithm works but you got red screen probably you misspel something in the output screen For example: Input Result -13 27 15 9 36 33 34 18 341 342 1) Please enter your birthday between 1 and example, T-2..): 3 Please enter an appropriate day! Enter initial letter of your name, (capital english letters only) C-3 2) What is the 3th power of 3? 27 3) How many prime numbers can you count until 272 15 It is not correct! 9 4) Enter theianent of the Fibonacci series: 36 It is not correct 33 It is not correct! 34 Enter your age(between 1-300): 10 5) what is the result of 34107 343 It is not correct 30 Congratulations! You found the code the code 1 4 2 17 15 7 8 6 5 13 8 se 487 488 481) Please enter your birthday between 1 and 7(example on, Tur2..): Enter instial letter of your name, (capital english letters only) 2) What is the 4th power of 2 4 2 - 2 17 It is not correct! 16 3) How many prine numbers can you count 10 7 It is not correct! B It is not correct! 6 4) Enter den element of the Fibonacci series: 5 It is not correct 13 It is not correct 8 Enter your age between 1-100) 50 5) What is the result of 8 27 42 It is not correct! It is not correct! Congratulations! You found the code! The code is see

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago