INTERACTIVE ONLINE COURSE

Python 3

FOR BEGINNERS


"The first Python course that simply amazed me. Very well explained and easy to understand." (Alexandru Cosmin)

"The best Python course in Romania." (Iulian Geană)


ALL REVIEWS
COMUNITY
EXERCISES
Computer Science - Problem Collection in Python


[Back to Index]

Page:
/ 1     
1. Kitty, Perry and Terry. Kitty the kitten challenges her kittens, Perry and Terry, to the following game: run on the roofs of the houses on the street after their owners' house, Perry on the houses on the right side of the street, numbered with consecutive even numbers, and Terry on the left side where the houses are numbered with consecutive odd numbers. They are asked to tell Kitty how many of the houses have a number with a sum of digits that is a perfect square when they reach the end of the street.
Knowing the house number of their owners, n>0, and that all other houses have numbers greater than this, and knowing the house number at the end of the street, m with n<m, determine and display the numbers communicated to Kitty by Perry and Terry.

The numbers n and m, non-zero natural numbers with a maximum of 5 digits, will be read from the file case.in, and the result will be displayed in the file case.out.

[solve in editor]

Author: Voica Cornelia Nicoleta | Code: #42 | Medium
2. Project - Oracle. Write a program that creates a text file as a personal journal. The program should display/inform the user at each step, check the existence of the file, and display "I have created the file!"; "The file exists, what do you want to do? Enter 1 for reading, 2 for additions, 3 for permanent deletion of the file, 0 for exit".

Note! Use the datetime module (look it up on the Internet): from datetime import date and data = date.today() or use another method (reading from the keyboard) to insert the current date at the beginning of each addition.

[solve in editor]

Author: RADULESCU BARBU CRISTIAN | Code: #70 | Medium
3. Piggy Bank. Write a program that creates a text file as a piggy bank/savings account. The program should display/inform the user at each step. Check the existence of the file and display "I have created the file!"; "The file exists, what do you want to do? Enter 1 for reading, 2 for additions, 3 for permanent deletion of the file, 0 for exit".

Note! Consider adding 3 other pieces of information: date, source (mom, dad, grandfather, sister, etc.), and currency (lei, euros, dollars, etc.).

Use the datetime module: from datetime import date and data = date.today() or use another method (reading from the keyboard) for the date.

. At the end of the viewing operation (2), display the total situation: "You have x lei, y euros, and z dollars".

[solve in editor]

Author: RADULESCU BARBU CRISTIAN | Code: #71 | Hard
4. Synonyms/Antonyms. Write a program that creates a text file as a Dictionary of Synonyms/Antonyms entered from the keyboard.

The program should display/inform the user at each step. Check the existence of the file and display "I have created the file!"; "The file exists, what do you want to do? Enter 1 for reading, 2 for additions, 3 for permanent deletion of the file, 0 for exit".

The file will store the base words on the first line and the corresponding synonym/antonym on the second line.

[solve in editor]

Author: RADULESCU BARBU CRISTIAN | Code: #75 | Medium
Page:
/ 1     
Choose one of the proposed problems ...
 arrow_back   home   perm_identity   list   arrow_upward