0% found this document useful (0 votes)
15 views

Case Study B - Final

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

Case Study B - Final

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

FINAL CASE STUDY - B

CC 102: Programming 1

NAME: LASTNAME, FIRSTNAME MIDDLENAME

1st YEAR BLOCK: E, F, G, H, I, J, K

1. Python program to convert temperatures to and from Celsius and Fahrenheit.


[ Formula : c/5 = f-32/9 [ where c = temperature in Celsius and f =
temperature in Fahrenheit ]
Expected Output :
60°C is 140 in Fahrenheit
45°F is 7 in Celsius
2. Python program to guess a number between 1 and 99.
Note : User is prompted to enter a guess. If the user guesses wrong then the
prompt appears again until the guess is correct, on successful guess, user will get
a "Well guessed!" message, and the program will exit.
3. Python program to construct the following pattern.

* *
* * * *
* * * \ / * * *
* * * * # * * * *
* * * * # * * * *
* * * * * * * *
* * * * * *
* * * *
* *
4. Python program that prints all the numbers from 0 to 6
except 3, 16, 24, 35, 42, 56, 69, 71, 83 and 99.
Note : Use 'continue' statement.
5. Python program that iterates the integers from 1 to 50. For
multiples of three print "Pogi" instead of the number and for
multiples of five print "Sir". For numbers that are multiples
of three and five, print "PogiSir".
Sample Output :
1
2
Pogi
4
Sir
6. Python program to check the validity of passwords input by users.
Validation :
 At least 1 letter between [a-z] and 1 letter between [A-Z].

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

 At least 1 number between [0-9].


 At least 1 character from [$#@].
 Minimum length 6 characters.
 Maximum length 16 characters.
7. Python program to print the alphabet pattern 'SAM - 1'.
Expected Output:
**** *** * * *
* * * * * * *
* * * * * * * *
*** ***** * * * *** *
* * * * * *
* * * * * *
**** * * * * * * *

8. Python program to print the alphabet pattern 'S'.

ooooooooooooooooo
ooooooooooooooooo
ooooooooooooooooo
oooo
oooo
oooo
ooooooooooooooooo
ooooooooooooooooo
ooooooooooooooooo
oooo
oooo
oooo
ooooooooooooooooo
ooooooooooooooooo
ooooooooooooooooo

9. Python program to convert a month name to a number of days.


Expected Output:

 List of months: January, February, March, April, May,


June, July, August , September, October, November,
December
 Input the name of Month: February
 No. of days: 28/29 days

10. Write a Python program to display the astrological sign for a given
date of birth.
Expected Output:

 Input birthday: 28
 Input month of birth (e.g. march, july etc): august
 Your Astrological sign is : virgo

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 1

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 2

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 3

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 4

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 5

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 6

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 7

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 8

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 9

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.


FINAL CASE STUDY - B
CC 102: Programming 1

CASE STUDY - 10

CODE:

OUTPUT:

Instructor: Samuel S. Mindaro, Jr.

You might also like