Giter Site home page Giter Site logo

vit-en-python4's Introduction

vit-en-python4

Question-1

Write a Python program that finds the repeating elements in a list containing a sequence. Try to use Python sets to solve this question.

Sample Input:

1 2 3 4 12 45 1 2 54 65 77 8 1 2

Sample Output:

Repeating elements: {1, 2}

Question-2

Create a restaurant menu using Python dictionaries and allow the user to order dishes.

You can follow these steps:

Create the restaurant's menu as a Python dictionary. Each dish can be defined as a key, with its price as the value. Print the menu on the screen for the user to view. Ask the user to order dishes. The user can enter a dish name or number. Store the dishes selected by the user in a dictionary. Print the user's orders on the screen and calculate the total price.

BONUS

Write a program that allows the user to enter a text and then converts this text into Morse code and prints it, or similarly, takes Morse code and converts it back into text. You can use the following Morse code dictionary.

MORSE_CODE_DICT = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----', ', ': '--..--', '.': '.-.-.-', '?': '..--..', '/': '-..-.', '-': '-....-', '(': '-.--.', ')': '-.--.-'}

Sample Input:

Entry a text: Fenyx IT Academy

Sample Output:

Morse code: ..-. . -. -.-- -..- .. - .- -.-. .- -.. . -- -.--

vit-en-python4's People

Contributors

irfanakgul avatar hjtos avatar

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.