0% found this document useful (0 votes)
5 views4 pages

1312 - 109 LAB Project 2

This document is a lab project report for a Bachelor in Computer Science course, detailing a programming assignment where students must write a Python program to suggest activities based on weather conditions. The report includes grading criteria, submission details, and a description of the project requirements, which involve using sequential execution and if-else statements. Students are expected to demonstrate their code and provide outputs for various scenarios.

Uploaded by

rbd45585h5
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)
5 views4 pages

1312 - 109 LAB Project 2

This document is a lab project report for a Bachelor in Computer Science course, detailing a programming assignment where students must write a Python program to suggest activities based on weather conditions. The report includes grading criteria, submission details, and a description of the project requirements, which involve using sequential execution and if-else statements. Students are expected to demonstrate their code and provide outputs for various scenarios.

Uploaded by

rbd45585h5
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/ 4

College of Computer Science

Department of Computer Science


Bachelor in Computer Science
Semester II Academic Year 2024-2025

1312 CCS-3, Introduction to Programming


Lab Project Report

Student Name: _____________________________________________________________

Student ID: ___________________

Section: 109

Submission Date: ______________

Grading Marks

Criteria Maximum Points Points Awarded Comments


Code 2
Implementation(40%)
Demo(30%) 1.5
Report(20%) 1
Logistics(10%) 0.5
Total 5

Final Grade: ___________________

Evaluator's Name: _____________

Signature: ____________________

Date: ________________________

Project 2
Description
A family plans a day out based on weather conditions: sunny (park), rainy (movie), or cold (stay home). The
program checks temperature and rain status sequentially.
Write a Python program to suggest an activity. Your program should:
• Use sequential execution to:
o Prompt for the temperature (in °C).
o Prompt for whether it’s raining (yes/no).
• Use an if-else statement to decide the activity:

o If temperature > 25°C and not raining, suggest "Go to the park".
o If raining, suggest "Watch a movie".
o Otherwise, suggest "Stay home".
• Ensure proper indentation for all blocks.

• Print the suggestion as "Suggested activity: [activity]".

Write your Code here

# Prompt for temperature


temperature = float(input("Enter the temperature in °C: "))

# Prompt for rain status


raining = input("Is it raining? (yes/no): ").strip().lower()

# Decide the activity


if temperature > 25 and raining == "no":
activity = "Go to the park"
elif raining == "yes":
activity = "Watch a movie"
else:
activity = "Stay home"

# Print the suggestion


print(f"Suggested activity: {activity}")
Paste your program and output Screen here

Different outputs with different scenarios by screenshots

You might also like