0% found this document useful (0 votes)
57 views1 page

Worksheet 3

programing worksheet

Uploaded by

Abel Media
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

Worksheet 3

programing worksheet

Uploaded by

Abel Media
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

------------------------------------------------------------------------------ was correct or not and also if the entered number is out of range or not (which is

***** Lab Challenges #3 [ Conditional Statements, Operators ] ***** 1-100).


------------------------------------------------------------------------------
13. Build a Fortune Predictor program that uses either the astrological Zodiac
1. Write a program that accepts an integer number (input) form the user and signs to generate a fortune, a prediction, or a horoscope based on the user’s input.
checks the given number is a palindrome or not. (Text Book) More specifically, the user may need to input his/her year of birth, month of birth,
and day of birth depending on zodiac or astrological techniques used. With this
2. Write a program that accepts an integer number (input) form the user and prints information, generate a custom message or fortune. You can use the Internet to
the revers of the given number. (Text Book) find more information on the astrology Zodiac signs.

3. Write a program that accepts an integer number (input) form the user and 14. Create a dice game that uses two six-sided dice. Each time the program runs,
checks the given number is odd or even. (Text Book) use random numbers to assign values to each die variable. Output a “Player Wins”
message to the user if the sum of the two dice is 7 or 11. Otherwise output the sum
4. Write a program that accepts an integer number (input) form the user and of the two dice and thank the user for playing.
checks the given number is a prime number or not. (Text Book)

5. Write a Program that calculates the Net Salary, deducting Tax & Pension from
Gross Salary.

6. Write a Program that calculates Quadratic equation.

7. Write a Program that calculate area, diameter & circumference of a circle, by


accepting radius of a circle from the user.

8. Write a Program that displays Greatest Common Factor (GCG) of two numbers.
(Text Book)

9. Wirte a Program to display sum of digits. (Text Book)


Exg: 123 = 6 -> (1+2+3 = 6)

10. Write a Program that display the reverse of digits. (Text Book)

11. Build a number guessing game that uses input validation [ isdigit() function ]
to verify that the user has entered a digit and not a non-digit (letter). Store a
random number between 1 and 10 into a variable each time the program is run.
Prompt the user to guess a number between 1 and 100 and alert the user if the user

You might also like