Skip to content

Latest commit

 

History

History

0x00-python-hello_world

Python - Hello, World

In this project, Python and shell scripting was used as well as interpreter, printing text and variables, indexing and slicing strings in Python.

Function Prototypes 💾

Prototypes for functions written in this project:

File Prototype
10-check_cycle.c int check_cycle(listint_t *list);
102-magic_calculation.py def magic_calculation(a, b):

Tasks 📃

  • 0. Run Python File

    • 0-run: Bash script that runs a Python script file saved in the environment variable $PYFILE.
  • 1. Run inline

    • 1-run_inline: Bash script that runs Python code saved in the environment variable $PYCODE.
  • 2. Hello, print

    • 2-print.py: Python script that prints exactly "Programming is like building a multilingual puzzle, followed by a new line using the function print.
  • 3. Print integer

    • 3-print_number.py: Python script that prints the integer stored in the variable number, followed by Battery street, followed by a new line.
    • Completion of this source code.
  • 4. Print float

  • 5. Print string

    • 5-print_string.py: Python script that prints a string stored in the variable str three times, then a new line, then the first nine characters contained in str, followed by another new line.
    • Completion of this source code.
  • 6. Play with strings

    • 6-concat.py: Python script that prints Welcome to Holberton School! using the variables str1 = "Holberton" and str2 = "School".
    • Completion of this source code.
  • 7. Copy - Cut - Paste

    • 7-edges.py: Python script that sets three string variables based on the string contained in the variable word as follows:
    • word_first_3: Contains the first three letters of the variable word.
    • word_last_2: Contains the last two letters of the variable word.
    • middle_word: Contains the value of the variable word without the first and last letters.
    • Completion of this source code.
  • 8. Create a new sentence

    • 8-concat_edges.py: Python script that prints object-oriented programming with Python, followed by a new line without creating new variables or string literals.
    • Completion of this source code.
  • 9. Easter Egg

    • 9-easter_egg.py: Python script that prints "The Zen of Python" by Tim Peters, followed by a new line.
  • 10. Linked list cycle

  • 11. Hello, write

    • 100-write.py: Python script that prints exactly and that piece of art is useful - Dora Korpar, 2015-10-19, followed by a new line to stderr using the function write from the sys module.
    • Exits with a status code of 1.
  • 12. Compile

    • 101-compile: Python script that compiles a Python script file stored in the environment variable $PYFILE and saves it to an output file $PYFILEc (ex. export PYFILE=my_main.py => output filename: my_main.pyc).
  • 13. ByteCode -> Python #1