Giter Site home page Giter Site logo

randyaajr / ra-modules_demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 9 KB

This assignment demonstrates how to use the import method to import from another script. I have created a measurement conversion app which asks the user for an integer value and then asks which formula he/she would like to convert from then to.

Dockerfile 32.23% Shell 29.13% Python 38.64%
python challenge python3 python-imports import measurement

ra-modules_demo's Introduction

Python Import Method (Challenge 1)


This assignment demonstrates how to use the import method to import from another script. I have created a measurement conversion app which asks the user for an integer value and then asks which formula he/she would like to convert from then to. The fuction is located on the 'lib_num.py' file where as the user input application is located on the 'main.py' file. For better user expirience, I have added the following message prompt:

Values available for conversion: 
 'cm to m'       'm to cm' 
 'cm to mm'      'mm to cm' 
 'mm to m'       'm to mm' 
 'ft to cm'      'ft to inch'         
 'inch to cm'    'inch to mm'
Enter the a numeric value: 

Challenge Requirements

First Task

  1. First Python File: Utility File

    • You can choose any name for this python file
    • This file will be just a utility file (library) that contains a list of function(s), variables, etc..
    • Contain at least one function (def …), with any name and any task.
    • The function name should reflect the function job (don’t worry about using packages: from import for now)
    • This file is only for creating the functions (We don’t call/run the function here), these will be called in another file which is the main python to run our application
    • Hint: you can test your function(s) in this file by calling/running them inside this file, then you will need to delete the calling of your function
  2. Second Python File: Main App File

    • You can choose any name for this python file
    • This file is the main one that represent our application and you will run in the terminal
    • Using any one of the import commands (3 ways) to call or import the function(s) from your first python file

Second Task

  • Commit this folder to your GitHub account
  • Add ReadMe file with some content about your simple challenge
  • You will need to share with us your (Screen and Mic) and show us your code and the result

ra-modules_demo's People

Contributors

randyaajr avatar

Watchers

 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.