Git Product home page Git Product logo

101-programming-exercises's People

Contributors

furlan avatar ielfurlan avatar

Watchers

 avatar

Forkers

ielfurlan

101-programming-exercises's Issues

004: Print my name

Print 100 times your name on the screen, with the number of the line.

For example:

001 - Daniel
002 - Daniel
...
100 - Daniel

007: What color is that square?

Positions on a chess board are identified by a letter and a number. The letter identifies
the column, while the number identifies the row, as shown below:

square

Write a program that reads a position from the user. Use an if statement to determine
if the column begins with a black square or a white square. Then use modular
arithmetic to report the color of the square in that row. For example, if the user enters
a1 then your program should report that the square is black. If the user enters d5
then your program should report that the square is white.

Extra Mile or Two

Validate the user entered a valid position.

Tip: Validate is the first character is a valid letter (a - h) and the second character is a number between 1 and 8.

Source

The Python Workbook, Ben Stephenson

005: Print my family name

Print 100 times alternating the name of my family, with the number of the line.

For example:

001-John
002-Matthew
003-Luke
004-John
005-Matthew
006-Luke
...

006: Print all the names of any family

Create a program with following behavior:

Enter the name of family member 1:
Enter the name of family member 2:
...
Enter the name of family member N:

When the name is blank, then print the list of family members 100 times (each), following this pattern (as an example, the family has 3 members):

1 - Family member name 1
2 - Family member name 2
3 - Family member name 3
4 - Family member name 1
5 - Family member name 2
6 - Family member name 3
...
298 - Family member name 1
299 - Family member name 2
300 - Family member name 3

003: Showing all four basic calculations

Create a program that receives 2 values and print the result of all basic 4 calculations.

Here is the expected result of the program:
Showing all four basic calculations
Enter the value of A: ____
Enter the value of B: ____
The value of A + B: <value of A + B>
The value of A - B: <value of A - B>
The value of A * B: <value of A * B>
The value of A / B: <value of A / B>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.