Read or watch:
- More Control Flow Tools
- Myths about Indentation
- IndentationError
- How To Use String Formatters in Python 3
- Learn to Program
- Learn to Program 2 : Looping
- PEP 8 – Style Guide for Python Code
What you should learn from this project:
- Why Python programming is awesome
- Why indentation is so important in Python
- How to use the if, if ... else statements
- How to use comments
- How to affect values to variables
- How to use the while and for loops
- How is Python’s for different from C‘s?
- How to use the break and continues statements
- How to use else clauses on loops
- What does the pass statement do, and when to use it
- How to use range
- What is a function and how do you use functions
- What does return a function that does not use any return statement
- Scope of variables
- What’s a traceback
- What are the arithmetic operators and how to use them
- This program will assign a random signed number to the variable number each time it is executed. Complete the source code in order to print whether the number stored in the variable number is positive or negative.
- This program will assign a random signed number to the variable number each time it is executed. Complete the source code in order to print the last digit of the number stored in the variable number.
2. I sometimes suffer from insomnia. And when I can't fall asleep, I play what I call the alphabet game
- Write a program that prints the ASCII alphabet, in lowercase, not followed by a new line.
- Write a program that prints the ASCII alphabet, in lowercase, not followed by a new line.
- Write a program that prints all numbers from 0 to 98 in decimal and in hexadecimal (as in the following example)
- Write a program that prints numbers from 0 to 99.
6. Inventing is a combination of brains and materials. The more brains you use, the less material you need
- Write a program that prints all possible different combinations of two digits.
- Write a function that checks for lowercase character.
- Write a function that prints a string in uppercase followed by a new line.
- Write a function that prints the last digit of a number.
- Write a function that adds two integers and returns the result.
- Write a function that computes a to the power of b and return the value.
- Write a function that prints the numbers from 1 to 100 separated by a space.
- Technical interview preparation:
- Write a program that prints the ASCII alphabet, in reverse order, alternating lowercase and uppercase (z in lowercase and Y in uppercase) , not followed by a new line.
- Write a function that creates a copy of the string, removing the character at the position n (not the Python way, the “C array index”).
- Write the Python function def magic_calculation(a, b, c): that does exactly the same as the following Python bytecode: