Skip to content

callagg2/pands-weekly-tasks

Repository files navigation

Pands Weekly Tasks

This repository comprises the weekly assignments for the Programming and Scripting Course .

Author: gerry Callaghan

Week 1: Setup a Github account and submit the https URL.

There are no files in this repository for this week.

Week 2: Write a program called bank.py

This program prompts the user to read in two monetary amounts, adds them, and prints them to specific criteria.

Week 3: Write a program called accounts.py

This program reads in a 10-character account number and outputs the account number with only the last 4 digits visible.

Week 4: Write a program called collatz.py

This program prompt the user to input any positive integer before outputting the successive values according to the following calculation. At each step, it calculates the next value by taking the current value and, if it is even, dividing it by two, but if it is odd, multiplying it by three and adding one. The program ends when the current value is one.

Week 5: Write a program called weekday.py

This program outputs whether or not today is a weekday. If today is a weekday, the program prints "Yes, unfortunately ## today is a weekday." while if today is a weekend day, the program prints "It is the weekend, yay!"

Week 6: Write a program called sqrt.py

This program accepts a positive floating-point number as input and outputs an approximation of its square root, using a user-made function called sqrt as opposed to a built in function such as x ** .5 or math.sqrt(x).

Week 7: Write a program called es.py

This program reads in a text file and outputs the number of e's contained therein.

Week 8: Write a program called plottask.py

This program displays a histogram of a normal distribution of a 1,000 random values having a with a mean of 5 and standard deviation of 2. Further, it contains a plot of the function h(x)=x3 in the range 0 to 10 on the one set of axes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages