Skip to content

Repository meant to host source code of the assignments I was given to enter the WEEE Open team

License

Notifications You must be signed in to change notification settings

lorcalhost/Python-WEEE-entry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WEEE Open team entry assignments

N|Solid

First assignment:

Creare uno script in python3 che riceva in input da tastiera due valori interi, li salvi in due variabili chiamate rispettivamente a e b e le stampi a video nel seguente formato: A = valore B = valore Successivamente, scambia i valori delle due variabili senza usare una terza variabile di swap, e ristampa il risultato nello stesso formato.

English:

Create a Python3 script which receives two integer numbers as keyboard input, saves those values in two variables called a and b and prints them on the console in the following format: A = value B = value Subsequently, swap the values of the two variables without the use of a third variable, and prints the result in the same format.


Second assignment:

Creare uno script in python3 che riceva in input da linea di comando una data nel formato GG/MM/AAAA. Lo script deve stampare a video il giorno della settimana corrispondente a quella data e dire quanti giorni di differenza ci sono tra quel giorno e la data in cui viene runnato lo script.

English:

Create a Python3 script that receives as command line argument a date in the DD/MM/YYYY format. The script has to print on the console the day of the week corresponding to that date and has to say how many days are in between the given date and today's date.


Third assignment:

Sia dato in input un file JSON contenente informazioni riguardanti dei dischi gidi. Lo script deve:

  1. Caricare il file in una lista di dizionari
  2. Ordinare la lista per codice ascendente con complessità O(nlog(n)))
  3. Scrivere in un file di testo i codici dei dischi rigidi funzionanti, per riga, ordinati per codice ascendente

English:

Given as input a JSON file containing information about hard disks. The script has to:

  1. Load the file in a dictionary list
  2. Order the list by increasing code with complexity O(nlog(n))
  3. Write in a text file the codes of the working hard disks, by line, ordered in an increasing order

JSON file format example:

[
    {
        "code": "HDD048976",
        "capacity": "120 GB",
        "working": "NO"
    },
    {
        "code": "HDD095709",
        "capacity": "230 GB",
        "working": "YES"
    }
]

About

Repository meant to host source code of the assignments I was given to enter the WEEE Open team

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages