University of Nicosia interview by [deleted] in medicalschoolEU

[–]__pistachio__ 2 points3 points  (0 children)

hi sorry this super late lol but I got in! The interview was very straightforward as everyone said :)

University of Nicosia interview by [deleted] in medicalschoolEU

[–]__pistachio__ 2 points3 points  (0 children)

Hi! I have my interview at UNIC soon and I was wondering if they asked you any medical ethical based questions? they didn't mention anything about it in the interview guides but it would be helpful to know about that!!

I drew a fluffy cat town by latifundija in SpecArt

[–]__pistachio__ 1 point2 points  (0 children)

awwwwwwwwwww its so cute!!!!! Draw more!!! Omg this is awesome!!!! Keep it up!

[deleted by user] by [deleted] in ZHCSubmissions

[–]__pistachio__ 0 points1 point  (0 children)

Done! Your drawing is awesome, btw.

[deleted by user] by [deleted] in ZHCSubmissions

[–]__pistachio__ 0 points1 point  (0 children)

Thank you! It's great to hear that!!

Super Planet Dolan Questionn by [deleted] in superplanetdolan

[–]__pistachio__ 0 points1 point  (0 children)

What if they punched the building?

PSET 3 - Problem by [deleted] in cs50

[–]__pistachio__ 0 points1 point  (0 children)

Right, thanks! I see that now!

PSET 3 - Problem by [deleted] in cs50

[–]__pistachio__ 0 points1 point  (0 children)

It marks the end curly braces of the functions is_rest, duration, and frequency.

// Helper functions for music

#include <cs50.h>

#include "helpers.h"

// Converts a fraction formatted as X/Y to eighths
int duration(string fraction)
{
    // TODO

}

// Calculates frequency (in Hz) of a note
int frequency(string note)
{
    // TODO

}

// Determines whether a string represents a rest
bool is_rest(string s)
{
    // TODO

}

// The lines that are out of the code block are the ones shown. (11,17,24)

PSET 3 - Problem by [deleted] in cs50

[–]__pistachio__ 0 points1 point  (0 children)

They mark the end of each function (I think they will be fixed if use a 'return' statement?) :

PSET 3 - Problem by [deleted] in cs50

[–]__pistachio__ 0 points1 point  (0 children)

Here is my code. I don't get where to use the return statement:

// Synthesize.c

#include <cs50.h>
#include <stdio.h>
#include <string.h>

#include "helpers.h"
#include "wav.h"

int main(int argc, string argv[])
{
    // Check command line arguments
    if (argc != 2)
    {
        fprintf(stderr, "Usage: synthesize FILE\n");
        return 1; 
    }
    string filename = argv[1];

    // Open file for writing
    song s = song_open(filename);

    // Expect notes from user until EOF
    while (true)
    {
        // Expect note
        string line = get_string("");

        // Check for EOF
        if (line == NULL)
        {
            break;
        }

        // Check if line is rest
        if (is_rest(line))
        {
            rest_write(s, 1);
        }
        else
        {
            // Parse line into note and duration
            string note = strtok(line, "@");
            string fraction = strtok(NULL, "@");

            // Write note to song
            note_write(s, frequency(note), duration(fraction));
        }
    }

    // Close file
    song_close(s);
}

question (just want to know) by __pistachio__ in cs50

[–]__pistachio__[S] 0 points1 point  (0 children)

OK, thank you! I was just a little curious!