Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    intro to programming python course

    hi guys, I'm new here, can someone show me how to design 2 programs? I have fallen very far behind in my course and am trying to catch up, but anytime i ask my instructor how to go about designing anything, she just tells me to "read my book"(book is "Think Python" btw). Its helpful... but not so much... anyways.. Their are some restrictions. All we currently know is:
    -variables
    -functions and functions that return values
    -conditionals and recursion
    -strings
    -lists
    -dictionaries
    -tuples

    here are the program outlines, thank you for the help.

    PROGRAM: You have the task to write an application for a new Customer Service Kiosk installed at a client’s business. Customers will use the kiosk to purchase items and make direct payments. The following paragraphs contain all of the client’s requirements for the Kiosk program.

    The client wants its customers to be able to choose to have a plain single item or with additional items. For example, if your kiosk serves coffee, the customer may choose plain black coffee or they may choose to add sugar and/or creamer. Your program must ask customers to select between serving the item plain or with various additions. The additional selections must be group by type, such as choices of creamers or sweeteners if you have a coffee kiosk. It must have at least three different types of additions.

    The Customer Service Kiosk system can produce multiple orders of the item; however, it does have a limited amount of resources since it does not connect to an external supply system. The Customer Service Kiosk system has an option for frequent customers. Each frequent customer has a special code. When the application calculates the final cost, the customer can enter the special code to receive a ten percent discount.



    PROGRAM: Average Weather

    Find the average monthly weather for a place you would like to visit.
    dublin.png

    You will find a different location that also gives you the monthly average temperature, and use that information to complete the following:

    1.) Create a dictionary with key value pairs of month and average temperature.

    2.) Declare a global value to hold the average temperature

    3.) Create an empty dictionary to store information on the warmest month of the year



    You will create two functions:

    The first function will calculate the average temp for a country, it should accept a dictionary parameter



    Your second function will create a new dictionary that uses the global average variable to compare with each month, months with temperatures higher than average will be added to the new dictionary. Print the new dictionary



    Make sure to call each function and pass your dictionary to them.

  2. #2
    New to the CF scene
    Join Date
    Oct 2016
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ALSO! Im designing this simple customer list, but my teacher wants us to do the following,Modify the resulting code as follows:

    Change the prompts in get_data() for the phone number to accept the data in the format: 999-999-9999
    Create a function called validate_phone() that accepts a string called phone as input. The function should:
    Use the split() function to break the phone string into a list of tokens using "-" as a separator.
    Test each of the characters in each of the tokens to make sure they are digits. Hint: Use nested for loops.
    Return true if phone is in the correct format, false otherwise
    Change get_data() to call the validate_phone() function to determine whether the data is valid.
    Submit your .py file.

    help would also be appreciated here! Thank you. here is a link to the program on my github as to what I have so far!!! https://github.com/georgeapostol/customer-list

  3. #3
    New Coder
    Join Date
    Nov 2016
    Location
    South Africa, Cape Town
    Posts
    49
    Thanks
    1
    Thanked 1 Time in 1 Post
    can you post the code you've done so far


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •