Collaboration Review

What are the benefits of a team? Explain some of the diveristies that your team has to offer. We can/do different jobs workoads can be less solving assignments with help of others

Describe how you will facilitate communication amongst group members. group messages gmail facetime group meetings scrum board

How will you hold each person accountable for their portion of the work? Think about dates, review tickets, and peer revies. scrum master assign tasks and make sure they’re completed with scrum board

print("Hello, World!")
Hello, World!

This program will use the command print and will show whatever is written in between the parenthesis.

user_input = input("Enter a number: ")

try:
    # Convert the user's input to a float
    user_number = float(user_input)
    
    # Perform a simple calculation
    result = user_number * 2
    
    # Print the result
    print(f"Double of {user_number} is {result}")
except ValueError:
    print("Invalid input. Please enter a valid number.")
Double of 2.0 is 4.0

This program will use the number that is written by the participant and multiply that said number by 2. That will then print with a number double that of the original written.

input_str = input("Enter a list of numbers separated by commas: ")

# Split the input string into a list of strings
number_strings = input_str.split(',')

# Initialize an empty list to store the converted numbers
numbers = []

try:
    # Convert the strings to integers and add them to the 'numbers' list
    for num_str in number_strings:
        num = int(num_str)
        numbers.append(num)
    
    # Perform a modification on the list (e.g., squaring each number)
    modified_numbers = [num ** 2 for num in numbers]
    
    # Print the modified list
    print("Original list:", numbers)
    print("Modified list (squared):", modified_numbers)
except ValueError:
    print("Invalid input. Please enter a list of valid numbers separated by commas.")
Original list: [2, 3, 4]
Modified list (squared): [4, 9, 16]

This program uses numbers written down by the participant and then adds the exponent ^2 to the original numbers. Then a list of the original numbers are written and then under that line will be the ^2 numbers.

# Get user input for a list of numbers (comma-separated)
input_str = input("Enter a list of numbers separated by commas: ")

# Split the input string into a list of strings
number_strings = input_str.split(',')

# Initialize an empty list to store the converted numbers
numbers = []

try:
    # Convert the strings to integers and add them to the 'numbers' list
    for num_str in number_strings:
        num = int(num_str)
        numbers.append(num)
    
    # Calculate the sum of numbers using iteration
    total = 0
    for num in numbers:
        total += num
    
    # Calculate the average
    average = total / len(numbers)
    
    # Print the average
    print("Average:", average)
except ValueError:
    print("Invalid input. Please enter a list of valid numbers separated by commas.")

Average: 3.0

This program uses multiple numbers and then combines them together and then gets the average of the total and prints.

import statistics

# Define a function to perform calculations
def calculate_statistics(numbers):
    # Calculate the sum
    total = sum(numbers)
    
    # Calculate the mean (average)
    mean = total / len(numbers)
    
    # Calculate the median
    median = statistics.median(numbers)
    
    # Calculate the standard deviation
    std_dev = statistics.stdev(numbers)
    
    # Return the results as a dictionary
    results = {
        "Sum": total,
        "Mean": mean,
        "Median": median,
        "Standard Deviation": std_dev
    }
    
    return results

# Get user input for a list of numbers (comma-separated)
input_str = input("Enter a list of numbers separated by commas: ")

# Split the input string into a list of strings
number_strings = input_str.split(',')

# Initialize an empty list to store the converted numbers
numbers = []

try:
    # Convert the strings to floats and add them to the 'numbers' list
    for num_str in number_strings:
        num = float(num_str)
        numbers.append(num)
    
    # Call the function to calculate statistics
    results = calculate_statistics(numbers)
    
    # Print the results
    print("Calculations:")
    for key, value in results.items():
        print(f"{key}: {value}")
except ValueError:
    print("Invalid input. Please enter a list of valid numbers separated by commas.")

Calculations:
Sum: 9.0
Mean: 3.0
Median: 3.0
Standard Deviation: 1.0

This program uses the top part to define what the calculations will do to the numbers imputed by the user. Those numbers will then be calculated for the sum, mean, median, and standard deviation.

# Get user input for a number
user_input = input("Enter a number: ")

try:
    # Convert the user's input to an integer
    user_number = int(user_input)
    
    # Check if the number is even or odd
    if user_number % 2 == 0:
        print(f"{user_number} is even.")
    else:
        print(f"{user_number} is odd.")
except ValueError:
    print("Invalid input. Please enter a valid number.")

10 is even.

Sample Image

def calculate_rectangle_area(length, width):
    area = length * width
    return area

# Get user input for the length and width of the rectangle
try:
    length = float(input("Enter the length of the rectangle: "))
    width = float(input("Enter the width of the rectangle: "))
    
    # Check if the input values are non-negative
    if length >= 0 and width >= 0:
        # Call the function to calculate the area
        area = calculate_rectangle_area(length, width)
        
        # Print the result
        print(f"The area of the rectangle with length {length} and width {width} is {area}.")
    else:
        print("Please enter non-negative values for length and width.")
except ValueError:
    print("Invalid input. Please enter valid numerical values for length and width.")
The area of the rectangle with length 2.0 and width 20.0 is 40.0.

This program defines the equation for finding the area of a rectangle at the top. Then the program will ask for a number that will be put in the length and then another number for width. It will then use the equation defined to get the area. If the numbers written by the user are negative, will get a value error.

import requests

API_KEY = '2f154dace08459a35fe9522ff7de936d'
BASE_URL = "http://api.openweathermap.org/data/2.5/weather?"

def get_weather(city_name):
    complete_url = BASE_URL + "q=" + city_name + "&appid=" + API_KEY
    response = requests.get(complete_url)
    data = response.json()

    if data["cod"] != 404:
        main_data = data["main"]
        weather_data = data["weather"][0]
        temperature = main_data["temp"] - 273.15  # Convert Kelvin to Celsius
        humidity = main_data["humidity"]
        weather_description = weather_data["description"]

        return (f"Weather in {city_name}:\n"
                f"Temperature: {temperature:.2f}°C\n"
                f"Humidity: {humidity}%\n"
                f"Description: {weather_description.capitalize()}")
    else:
        return "City Not Found!"

city_name = input("Enter city name: ")
print(get_weather(city_name))
Weather in san diego:
Temperature: 20.26°C
Humidity: 81%
Description: Moderate rain

This program works with the weather and shows what the user city that is written. Found through website data pulled.