Hot answers tagged

6 votes

Tips on spaces and hashes Mario

Well, you wanted some tips, so here are a few thoughts on it. You know that you have to create the correct number of rows, you have that part. Now, you need to think about how to create the spaces ...
user avatar
  • 63.1k
2 votes

MARIO LESS COMFORTABLE

Using the 5 pyramid as a guide: Height: 5          ##        ###      ####  &...
user avatar
2 votes
Accepted

Python Caesar not working for mix case etc

Multiple things. if plaintext.isupper(): you meant i.isupper(). plaintext.isupper() would check whether the whole string is upper-case, which it is not, but it also isn't completely lower-case, so ...
user avatar
  • 20.7k
2 votes
Accepted

Tips on spaces and hashes Mario

place 2 "for loops", 1 for spaces and 1 for dashes inside your row "for loop"... tip its a double loop in a loop. your ("\n") needs to be outside your two inner loops. now getting it to work is a ...
user avatar
  • 63
1 vote
Accepted

Readability CS50 Not counting the spaces

string input = get_string("Text:"); //getting input from the user int len = strlen(input); //determining the length of the string int space = 0; //declaring a variable to count whitespaces ...
user avatar
1 vote
Accepted

Struggling to align pyramid and check for extra spaces at the end of each line in pset6 mario.py less

Don't make things complicated. for x in range (height): print((height-x - 1)*' ' + (x+1)*'#')
user avatar
  • 701
1 vote
Accepted

Can't properly check mario.c less comfortable, something wrong with spacing

Your staircase has the stairs going down to the right. They're supposed to go up from the left. Perhaps a review of the assignment specification is in order? There's a second problem lying in wait, ...
user avatar
  • 63.1k
1 vote
Accepted

Mario help! Spaces and hashes do not match the code

Let's see if I can point you in the right direction here. For spaces, for (int s = i-1; s >= r; s--) is giving you one too many spaces every time because of the test condition. Let's check out a ...
user avatar
  • 63.1k
1 vote
Accepted

PSET 1 Mario calculating spaces

You don't need it to be height-i-1 and you can just do height-i Your hashes can be i+1 rather than i+2 If you do this, I think it will work as planned. Hope this helps, Ian
user avatar
  • 63
1 vote

What is the difference between 'printf(" ");' and 'printf("%s"," ");'?

They should work exactly the same. printf(" "); will print a single space, the content between the double quotes. printf("%s"," ") will grab the first parameter " "after the format string, "%s" and ...
user avatar
  • 63.1k
1 vote

Vigenere key counts spaces in progression

It wasn't completely clear, but it seems that you are having a problem with your key advancing when non-alpha letters are processed. If this is the case, the relevant code is what isn't shown. My best ...
user avatar
  • 63.1k
1 vote
Accepted

Spaces help Mario

I spent many hours on this and finally solved it tonight... just haven't ran it through the CS50 checker yet. BLUF:(Bottom line up front:) your heading in wrong direction thinking of multiplication. ...
user avatar
  • 63

Only top scored, non community-wiki answers of a minimum length are eligible