Skip to content

rogerjaffe/python-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APCSP Python Algorithm Projects

This project contains a collection of Python projects taken from https://emkc.org/challenges/

Each file includes a description of the task in the comments along with several sample inputs and outputs you can use to test your code.

Each file also indicates where you should place your code to solve the problem.

Use print() statements to print your results.

  • If you want each print() statement to go to the next line use print("Hello world!").

  • If you want to print and stay on the same line use print("Hello world!", end="").

Check your code by:

  • Open a terminal window
  • Use cd to go into the correct folder
  • Once in the right folder enter iPython
  • Run your code with run <file-name> <sample-input1> <sample-input2> ... and compare your output with the instructions.

IMPORTANT NOTE: For the Count Frequency challenge you MAY NOT use the mode function from the statistics library. statistics.mode does not support multiple modes so it will fail on some of the tests!!

If you want to do this correctly you should write an algorithm or flowchart first!!

Useful built-in Python functions

  • int(string): Converts a string number to an integer. int("42") returns 42

  • str(number): Converts a number to a string. str(42) returns "42"

What does checkArguments do?

This is a little function that checks to make sure you are calling your programs with the correct number of parameters.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages