teleren/devto huggingface dataset:
07. Hotel Room
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:51:19

```cs
using System;
using System.Text;

namespace HotelRoom
{
internal class Program
{
    static void Main(string[] args)
    {
        string month = Console.ReadLine();
        int numberOfNights = int.Parse(Console.ReadLine());

        double studio = 0.00;
        double apartment = 0.00;

        if (month == "May" || month == "October")
        {
            studio = 50.00;
            apartment = 65.00;

            if (numberOfNights > 14)
            {
                studio -= studio * 0.30;
                apartment -= apartment * 0.10;
            }
            else if (numberOfNights > 7)
            {
                studio -= studio * 0.05;
            }
        }
        else if (month == "June" || month == "September")
        {
            studio = 75.20;
            apartment = 68.70;

            if (numberOfNights > 14)
            {
                studio -= studio * 0.20;
                apartment -= apartment * 0.10;
            }
        }
        else if (month == "July" || month == "August")
        {
            studio = 76.00;
            apartment = 77.00;

            if (numberOfNights > 14)
            {
                apartment -= apartment * 0.10;
            }
        }

        double studioPrice = studio * numberOfNights;
        double apartmentPrice = apartment * numberOfNights;

        Console.WriteLine($"Apartment: {apartmentPrice:F2} lv.");
        Console.WriteLine($"Studio: {studioPrice:F2} lv.");
    }
}
}
```
10. Invalid Number (Using Bool)
Tags: csharp, softuni, conditionalstatementsadvanced, lab
Published: 2023-01-20 23:39:27

```cs
using System;

namespace InvalidNumber
{
class Program
{
    static void Main(string[] args)
    {
        int num = int.Parse(Console.ReadLine());

        bool isValid = (num >= 100 && num <= 200) || num == 0;

        if (!isValid)
        {
            Console.WriteLine("invalid");
        }
    }
}
}
```
06. Operations Between Numbers
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:49:34

```cs
using System;

namespace OperationsBetweenNumbers
{
internal class Program
{
    static void Main(string[] args)
    {
        double N1 = double.Parse(Console.ReadLine());
        double N2 = double.Parse(Console.ReadLine());
        char simbol = char.Parse(Console.ReadLine());

        double result = 0.00;

        // The type of operator depends by the User's given simbol.
        if (simbol == '+')
        {
            result = N1 + N2;
            if (result % 2 == 0)
            {
                Console.WriteLine($"{N1} + {N2} = {result} - even");
            }
            else
            {
                Console.WriteLine($"{N1} + {N2} = {result} - odd");
            }
        }
        else if (simbol == '-')
        {
            result = N1 - N2;
            if (result % 2 == 0)
            {
                Console.WriteLine($"{N1} - {N2} = {result} - even");
            }
            else
            {
                Console.WriteLine($"{N1} - {N2} = {result} - odd");
            }
        }
        else if (simbol == '*')
        {
            result = N1 * N2;
            if (result % 2 == 0)
            {
                Console.WriteLine($"{N1} * {N2} = {result} - even");
            }
            else
            {
                Console.WriteLine($"{N1} * {N2} = {result} - odd");
            }
        }
        else if (simbol == '/')
        {
            result = N1 / N2;
            if (N2 == 0)
            {
                Console.WriteLine($"Cannot divide {N1} by zero");
            }
            else
            {
                Console.WriteLine($"{N1} / {N2} = {result:F2}");
            }
        }
        else if (simbol == '%')
        {
            result = N1 % N2;
            if (N2 == 0)
            {
                Console.WriteLine($"Cannot divide {N1} by zero");
            }
            else
            {
                Console.WriteLine($"{N1} % {N2} = {result}");
            }
        }
    }
}
}
```
CLI Client for ReductStore v0.5.0 has been released
Tags: news, database, python, reductstore
Published: 2023-01-20 23:49:21

Hello everyone,

We're excited to announce the release of [version 0.5.0 of the Reduct CLI](https://github.com/reductstore/reduct-cli/releases/tag/v0.5.0)! This release brings a number of new features to improve data export and mirroring. Here are the highlights:


### Limit parallel tasks

We added a global option `--parallel` to limit the number of entries to be exported or mirrored in parallel. This can be useful when a bucket has a large number of entries and the network connection is slow. Usage example:

```
rcli export --parallel 5 folder server_1/bucket_1 . 
```

<!--more-->

### Export or mirror specific entries

Now you have a new option `--entries` to mirror or export some specific entries. This can be useful when you want to mirror or export only a subset of entries in a bucket:

```
rcli mirror server_1/bucket_1 server_2/bucket --entries=entry_1,entry_2,entry_3
```

### Graceful stop

We added graceful stop for long-running operations. This means that if you interrupt the `mirror` or `export` commands,they will finish mirroring the current entry and then exit.


To update to the latest version of the Reduct CLI, use the following command:

```
pip install -U reduct-cli
```

if you have any questions or feedback, don't hesitate to reach out in [Discord](https://discord.gg/NQbPeGgzdR) or by opening a discussion on [GitHub](https://github.com/reductstore/reductstore/discussions).

Thanks for using ReductStore!
05. Journey
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:49:03

```cs
using System;

namespace Journey
{
internal class Program
{
    static void Main(string[] args)
    {
        double budget = double.Parse(Console.ReadLine());
        string season = Console.ReadLine();


        string destination = "";
        string vacationType = "";
        double price = 0.00;

        //The destination depends by the amount of the budget.
        if (budget <= 100)
        {
            destination = "Bulgaria";
        }
        else if (budget <= 1_000)
        {
            destination = "Balkans";
        }
        else if (budget > 1_000)
        {
            destination = "Europe";
        }

        //The  type of vacation depends by the destiantion.
        if (destination == "Bulgaria")
        {
            if (season == "summer")
            {
                vacationType = "Camp";
                price = budget - budget * 0.30;
            }
            else if (season == "winter")
            {
                vacationType = "Hotel";
                price = budget - budget * 0.70;
            }
        }
        else if (destination == "Balkans")
        {
            if (season == "summer")
            {
                vacationType = "Camp";
                price = budget - budget * 0.40;
            }
            else if (season == "winter")
            {
                vacationType = "Hotel";
                price = budget - budget * 0.80;
            }
        }
        else if (destination == "Europe")
        {
            if (season == "summer" || season == "winter")
            {
                vacationType = "Hotel";
                price = budget - budget * 0.90;
            }
        }
        double spentAmount = budget - price;

        Console.WriteLine($"Somewhere in {destination}");
        Console.WriteLine($"{vacationType} - {spentAmount:F2}");
    }
}
}
```
10. Invalid Number
Tags: csharp, softuni, conditionalstatementsadvanced, lab
Published: 2023-01-20 23:38:56

```cs
using System;

namespace Invalid_Number
{
internal class Program
{
    static void Main(string[] args)
    {
        int number = int.Parse(Console.ReadLine());

        if (number == 0 || number >= 100 && number <= 200)
        {
            Console.WriteLine();
        }
        else
        {
            Console.WriteLine("invalid");
        }
    }
}
}
```
04. Fishing Boat
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:48:30

```cs
using System;

namespace FishingBoat
{
internal class Program
{
    static void Main(string[] args)
    {
        int groupBudget = int.Parse(Console.ReadLine());
        string season = Console.ReadLine();
        int fishersAmount = int.Parse(Console.ReadLine());

        double rentPrice = 0.00;

        switch (season)
        {
            case "Spring":
                rentPrice = 3000.00;
                break;

            case "Summer":
            case "Autumn":
                rentPrice = 4200.00;
                break;

            case "Winter":
                rentPrice = 2600.00;
                break;
        }

        if (fishersAmount <= 6)
        {
            rentPrice -= rentPrice * 0.10;
        }
        else if (fishersAmount >= 7 && fishersAmount <= 11)
        {
            rentPrice -= rentPrice * 0.15;
        }
        else if (fishersAmount > 12)
        {
            rentPrice -= rentPrice * 0.25;
        }

        if (fishersAmount % 2 == 0 && season != "Autumn")
        {
            rentPrice -= rentPrice * 0.05;
        }


        double remainingMoney = groupBudget - rentPrice;
        double neededMoney = rentPrice - groupBudget;

        if (groupBudget >= rentPrice)
        {
            Console.WriteLine($"Yes! You have {remainingMoney:F2} leva left.");
        }
        else
        {
            Console.WriteLine($"Not enough money! You need {Math.Abs(neededMoney):F2} leva.");
        }
    }
}
}
```
3. New House (If-Switch Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:47:49

```cs
using System;

namespace NewHouse_Switch_
{
internal class Program
{
    static void Main(string[] args)
    {
        string flowersType = Console.ReadLine();
        int flowersAmount = int.Parse(Console.ReadLine());
        int budget = int.Parse(Console.ReadLine());

        double totalPrice = 0.00;

        double rosesPrice = 5.00;
        double dahliasPrice = 3.80;
        double tulipsPrice = 2.80;
        double narcissusPrice = 3.00;
        double gladiolusPrice = 2.50;

        switch (flowersType)
        {
            case "Roses":
                totalPrice = flowersAmount * rosesPrice;
                if (flowersAmount > 80)
                {
                    totalPrice -= totalPrice * 0.10;
                }
                break;

            case "Dahlias":
                totalPrice = flowersAmount * dahliasPrice;
                if (flowersAmount > 90)
                {
                    totalPrice -= totalPrice * 0.15;
                }
                break;

            case "Tulips":
                totalPrice = flowersAmount * tulipsPrice;
                if (flowersAmount > 80)
                {
                    totalPrice -= totalPrice * 0.15;
                }
                break;

            case "Narcissus":
                totalPrice = flowersAmount * narcissusPrice;
                if (flowersAmount < 120)
                {
                    totalPrice += totalPrice * 0.15;
                }
                break;

            case "Gladiolus":
                totalPrice = flowersAmount * gladiolusPrice;
                if (flowersAmount < 80)
                {
                    totalPrice += totalPrice * 0.20;
                }
                break;
        }

        double remainingMoney = budget - totalPrice;
        double neededMoney = totalPrice - budget;

        if (budget < totalPrice)
        {
            Console.WriteLine($"Not enough money, you need {Math.Abs(neededMoney):F2} leva more.");
        }
        else
        {
            Console.WriteLine($"Hey, you have a great garden with {flowersAmount} {flowersType} and {remainingMoney:F2} leva left.");
        }
    }
}
}
```
3. New House (If Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:46:32

```cs
using System;

namespace NewHouse_If_
{
internal class Program
{
    static void Main(string[] args)
    {
        string flowersType = Console.ReadLine();
        int flowersAmount = int.Parse(Console.ReadLine());
        int budget = int.Parse(Console.ReadLine());

        double totalPrice = 0.00;

        double rosesPrice = 5.00;
        double dahliasPrice = 3.80;
        double tulipsPrice = 2.80;
        double narcissusPrice = 3.00;
        double gladiolusPrice = 2.50;

        if (flowersType == "Roses")
        {
            totalPrice = flowersAmount * rosesPrice;
            if (flowersAmount > 80)
            {
                totalPrice -= totalPrice * 0.10;
            }
        }
        else if (flowersType == "Dahlias")
        {
            totalPrice = flowersAmount * dahliasPrice;
            if (flowersAmount > 90)
            {
                totalPrice -= totalPrice * 0.15;
            }
        }
        else if (flowersType == "Tulips")
        {
            totalPrice = flowersAmount * tulipsPrice;
            if (flowersAmount > 80)
            {   
                totalPrice -= totalPrice * 0.15;
            }
        }
        else if (flowersType == "Narcissus")
        {
            totalPrice = flowersAmount * narcissusPrice;
            if (flowersAmount < 120)
            {
                totalPrice += totalPrice * 0.15;
            }
        }
        else if (flowersType == "Gladiolus")
        {
            totalPrice = flowersAmount * gladiolusPrice;
            if (flowersAmount < 80)
            {

                totalPrice += totalPrice * 0.20;
            }
        }

        double neededMoney = totalPrice - budget;
        double remainingMoney = budget - totalPrice;

        if (totalPrice > budget)
        {
            Console.WriteLine($"Not enough money, you need {neededMoney:F2} leva more.");
        }
        else
        {
            Console.WriteLine($"Hey, you have a great garden with {flowersAmount} {flowersType} and {remainingMoney:F2} leva left.");
        }

    }
}
}
```
2. Summer Outfit (Switch Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:45:41

```cs
using System;

namespace SummerOutfit_Switch_
{
internal class Program
{
    static void Main(string[] args)
    {
        int degrees = int.Parse(Console.ReadLine());
        string dayTime = Console.ReadLine();

        string outfit = "";
        string shoes = "";

        switch (dayTime)
        {
            case "Morning":
                if (degrees >= 10 && degrees <= 18)
                {
                    outfit = "Sweatshirt";
                    shoes = "Sneakers";
                }
                else if (degrees > 18 && degrees <= 24)
                {
                    outfit = "Shirt";
                    shoes = "Moccasins";
                }
                else if (degrees >= 25)
                {
                    outfit = "T-Shirt";
                    shoes = "Sandals";
                }
                break;

            case "Afternoon":
                if (degrees >= 10 && degrees <= 18)
                {
                    outfit = "Shirt";
                    shoes = "Moccasins";
                }
                else if (degrees > 18 && degrees <= 24)
                {
                    outfit = "T-Shirt";
                    shoes = "Sandals";
                }
                else if (degrees >= 25)
                {
                    outfit = "Swim Suit";
                    shoes = "Barefoot";
                }
                break;

            case "Evening":
                if (degrees >= 10 && degrees <= 18)
                {
                    outfit = "Shirt";
                    shoes = "Moccasins";
                }
                else if (degrees > 18 && degrees <= 24)
                {
                    outfit = "Shirt";
                    shoes = "Moccasins";
                }
                else if (degrees >= 25)
                {
                    outfit = "Shirt";
                    shoes = "Moccasins";
                }
                break;
        }
        Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
                   $"{shoes}.");
    }
}
}
```
2. Summer Outfit (If Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:44:58

```cs
using System;

namespace SummerOutfit_If_
{
internal class Program
{
    static void Main(string[] args)
    {
        int degrees = int.Parse(Console.ReadLine());
        string dayTime = Console.ReadLine();

        string outfit;
        string shoes;

        if (dayTime == "Morning")
        {
            if (degrees >= 10 && degrees <= 18)
            {
                outfit = "Sweatshirt";
                shoes = "Sneakers";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees > 18 && degrees <= 24)
            {
                outfit = "Shirt";
                shoes = "Moccasins";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees >= 25)
            {
                outfit = "T-Shirt";
                shoes = "Sandals";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
        }
        else if (dayTime == "Afternoon")
        {
            if (degrees >= 10 && degrees <= 18)
            {
                outfit = "Shirt";
                shoes = "Moccasins";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees > 18 && degrees <= 24)
            {
                outfit = "T-Shirt";
                shoes = "Sandals";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees >= 25)
            {
                outfit = "Swim Suit";
                shoes = "Barefoot";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
        }
        else if (dayTime == "Evening")
        {
            if (degrees >= 10 && degrees <= 18)
            {
                outfit = "Shirt";
                shoes = "Moccasins";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees > 18 && degrees <= 24)
            {
                outfit = "Shirt";
                shoes = "Moccasins";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }
            else if (degrees >= 25)
            {
                outfit = "Shirt";
                shoes = "Moccasins";

                Console.WriteLine($"It's {degrees} degrees, get your {outfit} and " +
            $"{shoes}.");
            }

        }
        
    }
}
}
```
1. Cinema (Switch Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:44:10

```cs
using System;

namespace Cinema_S
{
internal class Program
{
    static void Main(string[] args)
    {
        string projectionType = Console.ReadLine();
        int linesAmmount = int.Parse(Console.ReadLine());
        int columnsAmmount = int.Parse(Console.ReadLine());

        double premiere = 12.00;
        double normal = 7.50;
        double discount = 5.00;

        double result;
        double seats = linesAmmount * columnsAmmount;

        switch (projectionType)
        {
            case "Premiere":
                result = seats * premiere;
                Console.WriteLine($"{result:F2} leva");
                break;

            case "Normal":
                result = seats * normal;
                Console.WriteLine($"{result:F2} leva");
                break;

            case "Discount":
                result = seats * discount;
                Console.WriteLine($"{result:F2} leva");
                break;
        }
    }
}
}
```
1. Cinema (If Construction)
Tags: csharp, softuni, conditionalstatementsadvanced, exercise
Published: 2023-01-20 23:43:34

```cs
using System;

namespace Cinema
{
internal class Program
{
    static void Main(string[] args)
    {
        string projectionType = Console.ReadLine();
        int lineAmmount = int.Parse(Console.ReadLine());
        int columnsAmmount = int.Parse(Console.ReadLine());

        double premiere = 12.00;
        double normal = 7.50;
        double discount = 5.00;

        double seats = lineAmmount * columnsAmmount;
        double result;
        if (projectionType == "Premiere")
        {
            result = seats * premiere;
            Console.WriteLine($"{result:F2} leva");
        }
        else if (projectionType == "Normal")
        {
            result = seats * normal;
            Console.WriteLine($"{result:F2} leva");
        }
        else if (projectionType == "Discount")
        {
            result = seats * discount;
            Console.WriteLine($"{result:F2} leva");
        }
    }
}
}
```