Skip to content

afk1997/hyperskill-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Join JetBrains Academy from here

(Under Construction, Updating everday. Do visit again!)

Projects

  • Easy
  1. Zookeeper
  2. Coffee Machine
  3. Credit Calculator
  4. Simple Chatty Bot
  • Medium
  1. Hangman
  2. Tic-Tac-Toe
  3. Rock-paper-Scissors
  4. Numeric Matrix Processor
  • Hard
  1. Smart Calculator
  2. Text-Based Browser
  3. Tic-tac-Toe With AI
  4. To-Do List
  • Challenging
  1. Password Hacker
  2. HyperCar Service Center
  3. HyperJob Agency
  4. HyperNews Portal

About

This short code challenge can help the local zoo look after its denizens. You will create a tool for monitoring animals and their status.

Learning outcomes

This project is aimed at our beginners. It helps you understand some syntax basics and learn how to work with variables, data storage types such as lists, and while loops.

Stages

Stage 1: Rush into Print

First, let's try to get some simple output from your code.

Description

There are many animals in the zoo: all of them need care, and some of them are endangered and require preservation efforts. Animals must be fed, cleaned, surrounded by their kin, and kept happy. That is a difficult task for such a big open-range zoo, so one of your employers suggested a better way to accomplish that. She wants to be able to watch any animal on the screen with the help of a special program.
In this project, you will create a program that helps the zookeeper check on the animals and see that they're well. Your product will be able to understand commands from the zoo staff and show the animals on the monitor.

Objectives

To begin with, you should develop a simple printer. Your program must show the text from the output example.

Example

Output:

I do love animals!
Start looking after animals...
Deer looks fine.
Bat looks happy.
Lion looks healthy.

Stage 2: Show me an animal!

Show the zookeeper an image of her ward.

Description

The important thing about working with animals is watching them. We need to see the animals on the screen to know how they are doing, right? At this time, we are ready to print something awesome: animal images!

Objectives

In the second stage, you need to develop an animal printer. Your program should show a certain animal: you will find it in the code field.

Please, don't remove the r character at the start of the code template. It's a part of the string and it's important. So, the string should start with r""" sequence.

Example

Your output should contain the following ASCII image:

Switching on camera from habitat with camels...
 ___.-''''-.
/___  @    |
',,,,.     |         _.'''''''._
     '     |        /           \
     |     \    _.-'             \
     |      '.-'                  '-.
     |                               ',
     |                                '',
      ',,-,                           ':;
           ',,| ;,,                 ,' ;;
              ! ; !'',,,',',,,,'!  ;   ;:
             : ;  ! !       ! ! ;  ;   :;
             ; ;   ! !      ! !  ; ;   ;,
            ; ;    ! !     ! !   ; ;
            ; ;    ! !    ! !     ; ;
           ;,,      !,!   !,!     ;,;
           /_I      L_I   L_I     /_I
Yey, our little camel is sunbathing!

Stage 3: What's Inside?

The zookeeper wants to know what is inside each habitat, by its number.

Description

The third stage brings new abilities for your software: it will be able to recognize the number of a specific habitat from the input and show the animals living there.

Add all variables with images from the template to a variable with the type list. The order of variables matters: they must be in the order they're defined in the code. The list must contain all of them with no duplicates.

Objectives

In this stage, your program should:

Ask for a number of the habitat using the following phrase: Which habitat # do you need?.
Use the input number as an index of your habitat to print its content.
End with the following phrase:

The end of the program. To check another habitat restart the watcher please.

Examples

The greater-than symbol followed by a space (> ) represents the user input. Notice that it's not part of the input.

Example 1

Which habitat # do you need? > 5
 
Switching on camera from the habitat with rabbits...
         ,
        /|      __
       / |   ,-~ /
      Y :|  //  /
      | jj /( .^
      >-"~"-v"
     /       Y
    jo  o    |
   ( ~T~     j
    >._-' _./
   /   "~"  |
  Y     _,  |
 /| ;-"~ _  l
/ l/ ,-"~    \
\//\/      .- \
 Y        /    Y
 l       I     !
 ]\      _\    /"\
(" ~----( ~   Y.  )
It seems there will be more rabbits soon!

The end of the program. To check another habitat restart the watcher please.

Example 2

Which habitat # do you need? > 4
 
Switching on camera from the habitat with bats...
_________________               _________________
 ~-.              \  |\___/|  /              .-~
     ~-.           \ / o o \ /           .-~
        >           \\  W  //           <
       /             /~---~\             \
      /_            |       |            _\
         ~-.        |       |        .-~
            ;        \     /        i
           /___      /\   /\      ___\
                ~-. /  \_/  \ .-~
                   V         V
It looks like this bat is fine.
---
The end of the program. To check another habitat restart the watcher please.

Stage 4: Sustainable Care <3

Finally, your program is able to work for as long as needed!

Description

It's time to make your project more convenient and understandable. In this final stage, your software will be ready for use by the zoo staff. Your program should understand the habitat numbers, show the animals, and be able to work infinitely.

Objectives

These are your tasks at this point:

Your program should repeat the behavior from the previous stage, now in a loop
Do not forget to add an exit opportunity for the program: inputting the word exit must terminate the program.
At the end of execution, it must print See you!.

Example

The greater-than symbol followed by a space (> ) represents the user input. Notice that it's not part of the input.

The complete program should work this way:

Which habitat # do you need? > 3
 
Switching on camera from the habitat with a lovely goose...
    
                                    _
                                ,-"" "".
                              ,'  ____  `.
                            ,'  ,'    `.  `._
   (`.         _..--.._   ,'  ,'        \    \
  (`-.\    .-""        ""'   /          (  d _b
 (`._  `-"" ,._             (            `-(   \
 <_  `     (  <`<            \              `-._\
  <`-       (__< <           :
   (__        (_<_<          ;
    `------------------------------------------
This bird stares intently at you... (Maybe it's time to change the channel?)
> Which habitat # do you need? > 1
 
Switching on camera from the habitat with lions...
                                               ,w.
                                             ,YWMMw  ,M  ,
                        _.---.._   __..---._.'MMMMMw,wMWmW,
                   _.-""        '''           YP"WMMMMMMMMMb,
                .-' __.'                   .'     MMMMW^WMMMM;
    _,        .'.-'"; `,       /`     .--""      :MMM[==MWMW^;
 ,mM^"     ,-'.'   /   ;      ;      /   ,       MMMMb_wMW"  @\
,MM:.    .'.-'   .'     ;     `\    ;     `,     MMMMMMMW `"=./`-,
WMMm__,-'.'     /      _.\      F'''-+,,   ;_,_.dMMMMMMMM[,_ / `=_}
"^MP__.-'    ,-' _.--""   `-,   ;       \  ; ;MMMMMMMMMMW^``; __|
           /   .'            ; ;         )  )`{  \ `"^W^`,   \  :
          /  .'             /  (       .'  /     Ww._     `.  `"
         /  Y,              `,  `-,=,_{   ;      MMMP`""-,  `-._.-,
        (--, )                `,_ / `) \/"")      ^"      `-, -;"\:
The lion is croaking!
Which habitat # do you need? > exit
See you!

Coffee Machine

About

What can be better than a cup of coffee during a break? A coffee that you don’t have to make yourself. It’s enough to press a couple of buttons on the machine and you get a cup of energy; but first, we should teach the machine how to do it. In this project, you will work on programming a coffee machine simulator. The machine works with typical products: coffee, milk, sugar, and plastic cups; if it runs out of something, it shows a notification. You can get three types of coffee: espresso, cappuccino, and latte. Since nothing’s for free, it also collects the money.

Learning outcomes

This project allows you to get a taste of Python. Practice working with functions, challenge yourself with loops and conditions, and get more confident in Python.

Releases

No releases published

Packages

No packages published

Languages