Questions tagged [mario]

mario.c, one of the assignments for Problem Set 1, asks you to develop an algorithm to draw an ASCII art staircase similar to those seen in the classic Nintendo game.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

pset1- mario (less) error: expected expression

less.c:11:15: error: expected expression while (n < = 0 || n > 23); ^ 1 error generated. make: *** [less] Error 1 Please help! I keep getting this error when attempting to ...
0
votes
1answer
218 views

pset 1 - mario (less) no output

I've typed make less in the terminal but nothing happens. Here's my code: #include <stdio.h> #include <cs50.h> int main(void) { // Ask user for height int height; do { ...
0
votes
1answer
233 views

PSET 1: Mario help (Drawing pyramid)

Stuck on Pset 1 - drawing the pyramid (prompting the user for a number between 0 and 23 working fine). When I try to execute this program, it goes crazy- is there something wrong with my for loops? ...
0
votes
1answer
66 views

i've tried for a week to compile this. cs50 mario.c please help

#include <stdio.h> #include <cs50.h> int main (void) { int n = get_int("Height: "); for (int i = 1; 1 < n; i++) printf("#\n"); }
2
votes
1answer
256 views

pset6 mario/more fails one check50 test despite getting correct output

My code passes all tests of check50 running check50 cs50/2018/x/sentimental/mario/more except this one: rejects a height of 24, and then accepts a height of 2 expected " # #\n## ##\n", not "" ...
0
votes
2answers
3k views

i am unable to submit my work in pset1 of marioless. It shows me a comment in yellow which says invalid slug.What should I do?

~/workspace/ $ submit50 cs50/2018/x/marioless Connecting.... Invalid slug. Did you mean to submit something else? ~/workspace/ $ submit50 cs50/2018/x/marioless Connecting..... Invalid slug. Did you ...
0
votes
1answer
47 views

Declaring an identifier in pset1 mario

I think I managed to work out (through a bit of hacking and a bit of luck) mario pset1. In saying that I still don't understand why I wasn't required to declare variables at the top of the programme ...
0
votes
1answer
127 views

Can make mario pyramid but am now unable to insert loop or inequalities

This is what I have so far: #include <stdio.h> int main() { int i, space, rows, k=0; printf("Height: "); scanf("%d",&rows); for(i=1; i<=rows; ++i, k=0) { ...
0
votes
1answer
87 views

cs50 - I can not clear check pset1 Mario less cause “…required files…”. I'm in the right directory.

The check50 is returning I have not created the file, which I see has been a problem others experienced, but all the solutions offered are to get into the correct directory. I am in the correct ...
0
votes
1answer
43 views

cs50 wrong analysis of mario/more

Following it's analysis where it says my program is wrong, yet it is as it should, also there is nothing after the "#": :( handles a height of 1 correctly expected "# #\n", not "# # \n" :( handles ...
0
votes
1answer
61 views

pset6 problem with mario.more.py, even my output is correct but check50 is still showing error

This is my code in python import cs50 while True: print("height: ", end="") height= cs50.get_int(); if height>=0 and height<=23: break for i in range(1,height+1): ...
0
votes
1answer
53 views

pset1: Printing too many hashes

for the past few weeks I've been struggeling with making the half-piramid in pset1. I managed to come up with this code that prints the height of the piramid according to the user input, but after ...
0
votes
1answer
232 views

Pset1: expected “# #\n”, not “# #\n”

I fail to handle the following :( handles a height of 1 correctly expected "# #\n", not "# #\n" But the expected result and the actual result look the same. include<cs50.h> include<stdio....
0
votes
1answer
1k views

The question mark (????) example | Mario

From the third lecture I can't understand the following: Here is the code example: #include <stdio.h> int main(void) { for (int i = 0; i < 4; i++) { printf("?"); ...
0
votes
0answers
66 views

Can't understand why i can't pass check50 for mario less

I'm totally confused, I tried every solution I could find, but still, I can't pass the check50. I keep getting the expected "##\n", not "#\n" error. i really need your help. here's my code: [removed ...
0
votes
1answer
107 views

MARIO!! just look over

what in the world is wrong with my code: #include <stdio.h> #include <cs50.h> int main(void) { int n; do { // prompt user for a number 0 to 23 n = get_int(); printf ...
0
votes
1answer
37 views

do while mistake , please give right code

#include <cs50.h> #include <stdio.h> int main(void) { do { int n=get_int("positive no:"); } while(n<=0); for( int i=0;i<n;i++) { printf("#\...
0
votes
1answer
28 views

Pset1 failing 4 checks

So i am failing these checks: :( handles a height of 1 correctly expected "# #\n", not "# #\n" :( handles a height of 2 correctly expected " # #\n## ##\n", not " # #\n## ##\n" :( handles a height ...
0
votes
1answer
133 views

pset6 mario.py more - check50 expected “# #\n”, not “# #\n”

No idea why but check50 says the output is wrong even though it seems the same, you can see it here.
0
votes
2answers
103 views

Problems on mario (pset1)

I want to test how the do-while loop works. But I encounter a problem, which I've spent an hour working on but couldn't figure out a solution. Here's my code. int main(void) { int n; do { ...
0
votes
1answer
96 views

Pset1 mario more comfortable: check50 comes up with errors but my output looks the same

I've searched all over and tried everything for a fix to my problem, but I can't figure it out. My output seems the exact same to me as the expected output, but I still get the following errors: :( ...
0
votes
1answer
200 views

Pset6 Sentimental Mario (more) check50 fails with correct output

My python code works correctly, outputting the appropriate number of spaces and #s to the terminal window, but it fails check50 for one test: :( rejects a height of 24, and then accepts a height of 2 ...
0
votes
1answer
50 views

I'm getting this error in some of my check

:) mario.c exists. :( mario.c compiles. expected exit code 0, not 1 :| rejects a height of -1 can't check until a frown turns upside down :| handles a height of 0 correctly can't check ...
0
votes
1answer
578 views

pset1 mario more

I just finished my mario pyramid, and tried myself, everything works. But in check50... :) mario.c exists. :) mario.c compiles. :) rejects a height of -1 :) handles a height of 0 correctly :( handles ...
0
votes
1answer
194 views

Help with Mario - expected expression/identifier

I'm struggleing with syntax I think. I keep getting errors with expected expressions/identifiers. I've tried to mimic code I've seen, but I'm not getting it...I'm just trying to set my input and it'...
0
votes
1answer
31 views

When I enter input that is integer more than 23, the program stops. I think it is supposed continue prompting in this case. What's wrong?

#include <stdio.h> #include <cs50.h> int main(void) { int n; do { n = get_int("Height: "); } while (n<=0 || n>23); }
0
votes
1answer
373 views

Can anyone please help with mario less comfortable?

:) mario.c exists. :( mario.c compiles. expected exit code 0, not 1 :| rejects a height of -1 can't check until a frown turns upside down :| handles a height of 0 correctly can't check ...
0
votes
0answers
1k views

Extra Space Printing in CS50 Pset6 Mario Less - Python Version

Looks like similar questions were asked but I'm having problems with the Python version. Output looks fine on the surface but apparently the program is printing an extra spaces. I have played with the ...
0
votes
1answer
2k views

did not find EOF Pset 1 mario. expected “##\n”, not “ ##\n”

Program works like a charm but still get these errors in the end when running the check. :( handles a height of 0 correctly did not find EOF :( handles a height of 1 correctly expected "##\n",...
0
votes
1answer
73 views

Failed to write to 'mario.c'. Failed to retrieve resource from vfs-gce-usw-289-4.c9.io

I ran Mario and one of the loops repeated forever. I exited the terminal and now I can't compile. I get this error message: Failed to write to 'mario.c'. Failed to retrieve resource from vfs-gce-usw-...
0
votes
1answer
121 views

pset1 mario - hashes output

I managed to print the correct number of spaces. However, when it comes to the hashes, im stuck in 2 per row instead of increasing by one the number of them as the number of rows increases. Any help ...
0
votes
1answer
49 views

pset6 - range value in for loop

i implemented mario (less) in the following way import cs50 while True: x = cs50.get_int("Height: ") if x > 0 and x < 23: break hashes = 2 for i in range(x-1): for j in ...
0
votes
0answers
60 views

2017 mario.c trailing whitespace for height < 23

I have been trying to fix the whitespace error generated with my code: int main() { int height; do { printf("Height: "); height = get_int(); } while (height < 0 || ...
0
votes
1answer
2k views

Mario Less Comfortable, do-while loop problem

Hi everyone I made sure to do my research and go through the already posted questions. I am certain my while condition is wrong after research but don't understand the correction. my program runs but ...
0
votes
1answer
288 views

How do I fix these Check50 errors?

Here is the code #include stdio.h #include cs50.h int main(void) { printf ("Height: \n"); int height; do { height = get_int(); } while (23 < height || height &...
1
vote
2answers
102 views

PSET1 Mario More: Same output but still displays error

#include <stdio.h> #include <cs50.h> int main(void) { int block; do { printf("Height: "); block = get_int(); } while (block < 0 || block > 23); ...
0
votes
1answer
228 views

pset1 mario, how do you print the # in the right order

I am confused. How do you construct the basic left aligned pyramid, then add the spaces to the spaces to the left eventually? I don't understand how to get print 2# then next line print 2++ # include ...
0
votes
1answer
116 views

cs50 mario.c more check errors

I could not find the solution for my error on cs50 mario.c/more as my output shows perfectly fine on the terminal but i get check error which I don't understand please help: :( handles a height of 1 ...
0
votes
1answer
44 views

Issues with defining of an int

So, I finally managed to get my Mario working properly. There was, however, one bug that cost me lot of nerves to find and even thought I removed it successfully, I still don't fully understand why ...
0
votes
1answer
89 views

pset1_mario: Almost done! Please help the find error

guys I recently start learning programming, and I am stuck an the mario task. I can't find the error. I check it by using "make filename" command on the terminal, and it didn't show any error. However ...
0
votes
1answer
4k views

pset1 Mario less comfortable, trouble!

include include int main(void) { //USER INPUT int height; do { printf("Insert height:"); height = get_int(); } while (height < 1 || height > 23); //Drawing the hashmid! for (...
1
vote
1answer
1k views

pset1 mario less comfortable

Can someone lend me some advice? I'm having trouble with finding the logic between the space and hashes. int main(void) { int height, row, hash; do { printf("Height: "); ...
0
votes
1answer
113 views

pset1 mario more hlep please!

I'm totally new at programming. and i'm stuck at making mario, so i've searched a lot. I've got an idea from the other questions and made a code, but it looks quite funny. Here's my code. #include &...
0
votes
1answer
182 views

pset1 mario pyramid printing upside down

Hey guys so I've been struggling with how to go about getting my pyramid to print rightside up. So far I've only been able to get it to print with the base on the first row. Any help would be ...
0
votes
1answer
933 views

mario.c problem understanding how to print hashes

im having a hard time trying to understand how to print the hashes in increasing order. So far i know how to do the spaces(decreasing order) This is my code right now: /* * Ask the user for a height ...
0
votes
1answer
266 views

Having a problem with Check50 for Mario less

I have been getting an error from the check50 function for my Mario Less program. This is the reply from the check50 function. My codes work according to the specification and my own testings, so I'm ...
0
votes
1answer
221 views

Confused on mario.c 2017.

I'm having trouble with mario.c. It works right for most inputs except 2 and 1 I think. Can somebody tell me what's wrong: #include <cs50.h> #include <stdio.h> int main(void) { int ...
0
votes
1answer
304 views

Mario check50 timeout

I have a timeout problem when I'm checking the more comfortable version of mario app. When I'm running it by myself it works fine, but check50 returns time out in some cases, for example:" :( rejects ...
1
vote
2answers
89 views

pset1: mario - error msg

Newbie here. Apparently missing something here I can't even decipher the error message. Please let me know what went wrong! Thank you! int main(void) { int height; do { printf("...
0
votes
1answer
100 views

Stuck in pset1 mario.c. What am I doing wrong?

#include <cs50.h> #include <stdio.h> int main(void) { int n, i; do { printf("Heigh: "); n = get_int(); }while(n<0 || n>23); for (i=1; i<=n; i+...

1 2
3
4 5
10