Python

Need Help in Python Assignment?
We can help you if you are having difficulty with your Python Assignment. Just email your Java Assignment at admin@assignmentcache.com.
We provide help for students all over the world in Python Assignment.

Items 11 to 20 of 105 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction
  1. CIS115 Week 3 Lab Change Calculator in Python

    CIS115 Week 3 Lab Change Calculator and Shipping Calculator in Python

    Regular Price: $12.00

    Special Price: $10.00

    CIS115 Week 3 Lab Change Calculator and Shipping Calculator in Python


    CIS115 Week 3 Lab Overview


    Title of Lab: Change Calculator and Shipping Calculator in Python


    Summary - Part 1
    Create a program that calculates the coins needed to make change for the specified number of cents.


    Summary - Part 2
    Create a program that calculates the total cost of an order including shipping.


    Deliverables
    • 2 source code Python files.
    • A Word document containing both source code and the screen print of the program outputs.


    Lab Steps
    Part 1 – Change Calculator


    Sample Output:
    Change Calculator
    Enter number of cents (0-99): 99
    Quarters: 3
    Dimes: 2
    Nickels: 0
    Pennies: 4
    Continue? (y/n): y
    Enter number of cents (0-99): 55
    Quarters: 2
    Dimes: 0
    Nickels: 1
    Pennies: 0
    Continue? (y/n): n
    Bye!


    Specifications:
    • The program should display the minimum number of quarters, dimes, nickels, and pennies that one needs to make up the specified number of cents.
    • Assume that the user will enter a valid integer for the number of cents.
    • The program should continue only if the user enters "y" or "Y" to continue.



    Part 2 – Shipping Calculator


    Sample Output:
    ===============================================================
    Shipping Calculator
    ===============================================================
    Cost of items ordered: 49.99
    Shipping cost:             7.95
    Total cost:                 57.94


    Continue? (y/n): y
    ===============================================================
    Cost of items ordered: -65.50
    You must enter a positive number. Please try again.
    Cost of items ordered: 65.50
    Shipping cost:             9.95
    Total cost:                 75.45


    Continue? (y/n): n
    ===============================================================
    Bye!


    Specifications:
    Use the following table to calculate shipping cost:
    Cost of Items Shipping Cost
    < $30.00  $5.95
    $30.00    - $49.99 $7.95
    $50.00    - $74.99 $9.95
    > $75.00  Free


    • If the user enters a number that’s less than zero, display an error message and give the user a chance to enter the number again.

    Learn More
  2. CIS115 Week 4 Lab Multiplication Table in Python

    CIS115 Week 4 Lab Multiplication Table in Python

    Regular Price: $12.00

    Special Price: $10.00

    CIS115 Week 4 Lab Multiplication Table in Python


    CIS115 Week 4 Lab Overview


    Title of Lab: Multiplication Table in Python


    Summary
    This week's lab is to create a simple multiplication table using nested loops and if statements.
    Prompt the user for the size of the multiplication table (from 2x2 to 10x10). Use a validation loop to display a warning if the number is less than 2 or greater than 10 and prompt the user to enter the data again until they enter a valid number.
    Put a # after any even number in your table (odd numbers will have just a space/nothing after them).


    Deliverables
    • A source code Python file.
    • A Word document containing both source code and the screen print of the program outputs.


    Lab Steps


    Sample Output:
    The output should be something similar to the following.
    What size multiplication table would you like? (2 - 10): 1
    Invalid entry - Enter a number between 2 and 10
    What size multiplication table would you like? (2 - 10): 15
    Invalid entry - Enter a number between 2 and 10
    What size multiplication table would you like? (2 - 10): 10


    --- Multiplication Table ( 10 x 10 ) ---
             1      2      3      4      5      6      7      8      9     10
    ---------------------------------------------------------------------------
    1  |     1      2 #    3      4 #    5      6 #    7      8 #    9     10 #
    2  |     2 #    4 #    6 #    8 #   10 #   12 #   14 #   16 #   18 #   20 #
    3  |     3      6 #    9     12 #   15     18 #   21     24 #   27     30 #
    4  |     4 #    8 #   12 #   16 #   20 #   24 #   28 #   32 #   36 #   40 #
    5  |     5     10 #   15     20 #   25     30 #   35     40 #   45     50 #
    6  |     6 #   12 #   18 #   24 #   30 #   36 #   42 #   48 #   54 #   60 #
    7  |     7     14 #   21     28 #   35     42 #   49     56 #   63     70 #
    8  |     8 #   16 #   24 #   32 #   40 #   48 #   56 #   64 #   72 #   80 #
    9  |     9     18 #   27     36 #   45     54 #   63     72 #   81     90 #
    10 |    10 #   20 #   30 #   40 #   50 #   60 #   70 #   80 #   90 #  100 #



    Hints:
    • The outer loop will start each new row.
    • The inner loop will control the display of each column in the row.
    • Note that to keep the numbers right-aligned, there are different amounts of space before single digit numbers (those less than 10), double digit numbers (those between 10-99), and triple digit numbers (100).
    • The row labels can be added to your inner loop (note that there are different amounts of space required after the number in the row labels.
    • The column labels should use a separate loop(s) that run before the main outer loop.
    • You can continue printing on the same line using end="" in your print statement. This will come in handy if you want to print several things on one line inside a loop. For example, assuming the value of name is Ada, the following will print "Hello Ada" on one line:
    print("hello ", end="")
    print(name, end="")


    Tips:
    • Start early!
    • Do the basic table first without worrying about spacing or lining things up, and don't include row or column headings (add those later).
    • Once you get the numbers in the correct position, think about adding the proper amount of space before each number to line things up.
    • Once the columns line up, add the #/space for even/odd numbers.
    • Once the basic table is working, then add the row and column headings, and finally the main title.
    • Test as you go!

    Learn More
  3. CIS115 Week 5 Lab Race Time Sorting in Python

    CIS115 Week 5 Lab Race Time Sorting in Python

    Regular Price: $12.00

    Special Price: $10.00

    CIS115 Week 5 Lab Race Time Sorting in Python


    CIS115 Week 5 Lab Overview


    Title of Lab: Race Time Sorting in Python


    Summary
    Store the times into arrays called Chevy[ ] and Ford[ ]. Then list the winner of each pair, giving the number of seconds the winner won by. At the end declare which team won based on which team had the most wins.


    Deliverables
    • A source code Python file.
    • A Word document containing both source code and the screen print of the program outputs.


    Lab Steps
    There are eight cars in each team called Chevy and Ford. One car from each team races its opponent on the drag strip. Read in the racing times for the eight Chevy cars and then read in the times for the eight Ford cars.


    Sample Match:
    ---Input Chevy Times---
    Enter time for Chevy Car 1: 5.4
    Enter time for Chevy Car 2: 7.2
    Enter time for Chevy Car 3: 4.0
    Enter time for Chevy Car 4: 9.1
    Enter time for Chevy Car 5: 5.8
    Enter time for Chevy Car 6: 3.9
    Enter time for Chevy Car 7: 6.2
    Enter time for Chevy Car 8: 8.1
    ---Input Ford Times---
    Enter time for Ford Car 1: 5.8
    Enter time for Ford Car 2: 6.9
    Enter time for Ford Car 3: 3.9
    Enter time for Ford Car 4: 9.2
    Enter time for Ford Car 5: 5.8
    Enter time for Ford Car 6: 3.8
    Enter time for Ford Car 7: 6.0
    Enter time for Ford Car 8: 8.5
    And the winners are:
    Chevy by 0.4 sec
    Ford by 0.3 sec
    Ford by 0.1 sec
    Chevy by 0.1 sec
    Tie!
    Ford by 0.1 sec
    Ford by 0.2 sec
    Chevy by 0.4 sec
    And the winning team is: F O R D !


    Specifications:
    • Accept the racing times for each of the Chevy cars into the array Chevy[ ].
    • Accept the racing times for each of the Ford cars into the array Ford[ ].
    • Then declare the wining car for each race, giving the winning time in seconds.
    • If the times are identical, then declare the race was a tie.
    • Finally, declare which team won the match, assuming a tie is possible.

    Learn More
  4. CIS115 Week 6 Lab Shopping List in Python

    CIS115 Week 6 Lab Shopping List in Python

    Regular Price: $12.00

    Special Price: $10.00

    CIS115 Week 6 Lab Shopping List in Python


    CIS115 Week 6 Lab Overview


    Title of Lab: Shopping List in Python


    Summary
    Create a program that will allow a user to add, list, and delete items from a shopping list.


    Deliverables
    • A source code Python file.
    • A Word document containing both source code and the screen print of the program outputs.


    Lab Steps
    The program should be modular. For example, you will want to have an add_item(shopping_list) function, a delete_item(shopping_list) function, a display_list(shopping_list) function, a display_menu() function, and a main().


    Sample Output:
    Welcome to the program!
    1. Add an item
    2. List all items
    3. Delete an item
    4. Exit


    Enter a menu option: 2
    1 : bananas
    2 : apples


    Enter a menu option: 1
    Please enter the item: pears
    pears was added to the shopping list


    Enter a menu option: 2
    1 : bananas
    2 : apples
    3 : pears


    Enter a menu option: 3
    Which number to delete: 3
    pears was deleted


    Enter a menu option: 2
    1 : bananas
    2 : apples


    Enter a menu option: 4
    have a great day!


    Specifications:
    • The program should start with 2 items in the shopping list.
    • Don't forget to include at the end of the program the code:
     o if __name__ == "__main__":
       main();
    • Use this code for the delete_item(shopping_list) function:
     def delete_item(shopping_list):
        number=int(input("Which number to delete: "))
        if number<1 or number>len(shopping_list):
            print("Invalid number\n")
        else:
            item=shopping_list.pop(number-1)
            print(item," was deleted\n")
        print()

    Learn More
  5. CYB130 4.19 LAB Output values in a list below a user defined amount

    CYB/130 Week 3 Python LAB 4.19: Output values in a list below a user defined amount

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.19: Output values in a list below a user defined amount


    Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value.


    Ex: If the input is:
    5
    50
    60
    140
    200
    75
    100


    the output is:
    50
    60
    75
    The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.


    Such functionality is common on sites like Amazon, where a user can filter results.

    Learn More
  6. CYB130 4.18 LAB Smallest and largest numbers in a list

    CYB/130 Week 3 Python LAB 4.18: Smallest and largest numbers in a list

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.18: Smallest and largest numbers in a list


    Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smallest and largest integers in the list.


    Ex: If the input is:
    10
    5
    3
    21
    2
    -6
    the output is:
    2 21


    You can assume that the list of integers will have at least 2 values.

    Learn More
  7. CYB130 4.17 LAB Print string in reverse

    CYB/130 Week 3 Python LAB 4.17: Print string in reverse

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.17: Print string in reverse


    Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text.


    Ex: If the input is:
    Hello there
    Hey
    quit


    then the output is:
    ereht olleH
    yeH

    Learn More
  8. CYB 130 4.16 LAB Output range with increment of 10

    CYB/130 Week 3 Python LAB 4.16: Output range with increment of 10

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.16: Output range with increment of 10


    Write a program whose input is two integers. Output the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer.


    Ex: If the input is:
    -15
    30
    the output is:
    -15 -5 5 15 25


    Ex: If the second integer is less than the first as in:
    20
    5
    the output is:
    Second integer can't be less than the first.


    For coding simplicity, output a space after every integer, including the last.

    Learn More
  9. CYB 130 4.15 LAB Password modifier

    CYB/130 Week 3 Python LAB 4.15: Password modifier

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.15: Password modifier


    Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string.
    i becomes !
    a becomes @
    m becomes M
    B becomes 8
    o becomes .


    Ex: If the input is:
    mypassword
    the output is:
    Myp@ssw.rdq*s


    Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable.

    Learn More
  10. CBY 130 4.14 LAB Count input length without spaces periods or commas

    CYB/130 Week 3 Python LAB 4.14 LAB: Count input length without spaces, periods, or commas

    Regular Price: $8.00

    Special Price: $3.00

    CYB/130 Week 3 Python LAB 4.14 LAB: Count input length without spaces, periods, or commas


    Given a line of text as input, output the number of characters excluding spaces, periods, or commas.


    Ex: If the input is:
    Listen, Mr. Jones, calm down.
    the output is:
    21


    Note: Account for all characters that aren't spaces, periods, or commas (Ex: "r", "2", "!").


     

    Learn More

Items 11 to 20 of 105 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction