Uploaded by James Ignacio

LABORATORY 3

advertisement
LABORATORY 3
Objective:
Solve a computing problem using looping constructs in Python
Submission Requirements
• Make sure you use Python Colab
Link: https://colab.research.google.com/?utm_source=scs-index
• Separate each of the problem sets into different Python files.
• Add the following header to each Python file and supply with the appropriate
information:
# Author: Juan dela Cruz
# Date created: YYYY/MM/DD
# Question No.:
•
•
•
•
Add a comment (# this is a comment) on each line or block to briefly explain what
it does.
Make sure that you have run the code successfully before submitting.
Filename format: OfferingNumber_LastNameFirstName_Lab3_Q1.ipynb
Submit it through VSU e-Learning Portal only.
o If it could not be submitted here, please inform your instructor.
Problems:
1. Write a Python program that will ask the user five (5) times using a WHILE Loop
to input the full name, age, and gender of a person, then only display all the data
when the loop ends. NOTE: Apply break statement - (50 points)
2. Write a Python program that will display all prime numbers within a range (Ask
the user where to start and end) - (50 points)
Example:
Download