Skip to content

alainajaffer/intro-to-python-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Interesting Python Program

This Python program demonstrates various concepts such as variables, functions, loops, conditionals, and file I/O. The program manipulates an interest level variable, performs operations on it, and interacts with files for reading and writing.

Project requirements

The project should:

  1. Be hosted on GitHub.
  2. Contain at least one variable.
  3. Contain at least one conditional (if/else) statement.
  4. Contain at least a function (my_cool_func()).
  5. Have at least one while loop or one for loop.
  6. Make use of either import or read/write.
  7. Contain a README.md file with the description of your project.

Features

  • Defines an interest_level variable to represent the level of interest.
  • Contains a function check_interest(level) to evaluate the interest level and provide feedback.
  • Defines a function double_interest(level) to double the interest level.
  • Utilizes a for loop to modify the interest level multiple times.
  • Writes the final interest level to a file named interest.txt.
  • Reads and displays the content of the interest.txt file.

Getting Started

  1. Make sure you have Python installed on your system.
  2. Clone this repository or download the interesting_program.py file.

Usage

  1. Open a terminal or command prompt.
  2. Navigate to the directory containing interesting_program.py.
  3. Run the program using the command: python interesting_program.py.
  4. The program will display the updated interest level in each iteration and write the final interest level to a file.
  5. The content of the file will be read and displayed.

Example Output

Interest level after iteration 1: 10
Interest level after iteration 2: 20
Interest level after iteration 3: 40
Interest level from file: 40

About

Simple python program demonstrating key concepts in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages