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
11 views

I keep getting the following error when I use the Check50

You seem to be missing these required files: mario.c You are currently in: ~, did you perhaps intend another directory?
0
votes
1answer
77 views

Pset1 Mario - right-align the bricks - for function?

I've reached the point where I can create a pyramid but have an extra dot in the last row. Can't seem to remove it . Is there something i'm doing wrong in the nested 'for' function? #include <...
1
vote
3answers
57 views

PSET 1 Can't implement loop at the prompt

I'm still on my prompt part, couldn't get to the pyramid yet, my code compiles but I can't make the loop recursive, that is, after the first entry it goes back to the prompt $. Here is the code: #...
0
votes
1answer
77 views

Please help!! Pset 1: creating a pyramid

I have been struggling with pset1: creating a pyramid for a long time. I am reading other people's codes to learn the logic but I still cannot understand what is going on. Would you please explain the ...
0
votes
1answer
82 views

Help with Problem Set 1 Mario (less)

I have no idea what I am doing wrong here. Everything works just as specified, but for some reason I am still getting error messages. Please do not look at this if you have not already solved the it ...
0
votes
3answers
98 views

PSET6 Mario Python

I have been experiementing with this code for a couple hours and have come across an issue with each implementation. I can no longer put in any time at the moment so I figured I would go ahead and ask....
1
vote
2answers
107 views

pset1 (mario, more) - problem with unwanted leading spaces

This is what check50 gives me: > :( handles a height of 1 correctly > expected ""# #"", not "" "\n"# #"" > :( handles a ...
0
votes
1answer
42 views

Error Code - Use of undeclared identifier in PSET 1, Mario

An error code popped up while trying to compile my code, saying that the variable n had not been declared earlier. It had been declared however at the beginning. Here is the code and the terminal ...
0
votes
1answer
31 views

Query related to Mario program(more) in CS50 pset1

I can't figure out the problem in my code, it successfully creates a pyramid but doesn't reprompt when value other than 1-8 is entered, also it gives a space before printing the pyramid, causing ...
0
votes
2answers
34 views

mario more comfortable; “can't check until a frown turns upside down”

[EDIT: Code removed for Honor Code compliance.] The code seems to be running perfectly fine and gives the correct output But every time i try to check it, i get this: :) mario.c exists :( mario.c ...
0
votes
2answers
77 views

mario less comfortable help

I wrote this code for the mario problem but idk if it's right. i'm having trouble running it. It keeps saying error: linker command failed with exit code. #include <cs50.h> #include <stdio.h&...
0
votes
1answer
78 views

Unable to compile pset1. Mario (Less comfortable)

I am unable to compile my file and get many errors. INPUT #include <cs50.h> #include <stdio.h> int main(void) //Prompt for the height of the pyramid int height; height = get_int (...
0
votes
1answer
48 views

My 'pset1 Mario more comfortable' is returning check50 errors whilst seemingly correct

I saw this question has been asked in multiple ways before but I believe I've checked answers and am still stumped as to the issue I have. The output for my pset1 Mario more comfortable appears to be ...
1
vote
3answers
64 views

mario pset 1 starter issue

hey im having problems getting started with the mario pset. my code is below and i am getting these errors... any help would be so much appreciated thanks. mario.c:16:5: error: expected expression ...
0
votes
1answer
71 views

PSET 1 Less comfortable Mario

I have been writing this code for a day but I still could not get the result I want, I don't even know how the is giving me a weird result. Here's my code: #include <cs50.h> #include <stdio....
1
vote
1answer
75 views

PSET1 Mario pyramid - Can someone explain me the logic of this line of code?

I was able to make the Mario's pyramid from Problem Set 1, (I know it should be right alligned, not left). This is the code, and it is working fine when I execute the program, but I don't seem to ...
0
votes
1answer
26 views

Errors on Mario pyramid

I thought had solved the Mario Pyramid problem until I got back all these errors :( handles a height of 1 correctly Cause expected ""# #"", not "" # # ..." :( handles a height of 2 ...
0
votes
1answer
16 views

No rule to make target 'mario'. Stuck on where I am going wrong. Cannot compile existing file

I have viewed similiar question/answers on this site and still cannot troubleshoot where I am going wrong. The mario.c file exists in the mario folder. It just will not compile from what I can tell. ...
0
votes
2answers
56 views

Do - While loop

I am trying to do the Mario problem with C. The issue is that I want the user to select a number from 1 to 8. So my boolean expression is (n < 9 && n > 0). But I don't know why is not ...
0
votes
2answers
54 views

Pset1 Program does not stop printing dots dots/spaces for the pyramid and I don't understand why

After a certain number of iterations through the loops (lines 16 to 21), I expect the program to stop printing out dots since the "dotcount" should be equals to 0. However, an unnecessary dot is still ...
0
votes
0answers
29 views

it works in cs50 sandbox but when i use terminal to compile it doesnt

i followed the code about mario thing i used make mario / gcc -g mario.c -o mario -lcs50 -lm when i use make mario1.c:9:7: warning: implicit declaration of function 'get_int' is invalid in ...
0
votes
0answers
26 views

i use terminal to run mario stuff in my mac

i downloaded cs50 header file and tried <> , "" both but Undefined symbols for architecture x86_64: "_get_int", referenced from: _main in mario-af47a4.o ld: symbol(s) not found for ...
0
votes
2answers
53 views

When printing mario problem the second triangle appears below the first one

#include <stdio.h> #include <cs50.h> int main(void) { //This do while loop checks if user entered number 1-8 int x; do { x = get_int("Height: "); } while ...
0
votes
1answer
94 views

pset6 mario/more - output is seemingly correct, however failing tests

I've just finished mario/more in pset6, however, it does not pass the tests. The actual and expected outputs are identical, so is the expected string. The pyramid also looks identical to the c ...
0
votes
0answers
101 views

pset1 less comfortable mario

Somebody please help me I have watched the walkthrough thrice, many different videos and searched for answers on reddit and stackexchange yet i've been stuck at this for hours now and cant get through....
0
votes
1answer
13 views

error: expected identifier or '(' I thought I had solved this

#include <cs50.h> #include <stdio.h> #include <math.h> int n; { do { n = get_int("Height: "); } while (n < 1 && n < 8); for (int i = 0; i < 8; i++) { ...
0
votes
3answers
134 views

pset1 Mario more comfortable check50

I know this question has been asked several times but I haven't found an answer that worked for the issue I have. The output for my pset1 Mario more comfortable seems to be correct (including no extra ...
0
votes
1answer
95 views

cs50 problem set 1 mario. check50 command returns error: 'You seem to be missing these required files: mario.c'

I have an error with commands check50 cs50/problems/2020/x/mario/less and submit50 cs50/problems/2020/x/mario/less its returns: ~/ $ check50 cs50/problems/2020/x/mario/less Connecting..... You ...
0
votes
1answer
71 views

pset 6 mario, I'm getting wrong ouput

I'm getting an extra new line just after getting input. Help me fix it while True: n = cs50.get_int("Height: ") if n > 0 and n < 9: break for i in range(n + 1): if n == 0: ...
0
votes
1answer
81 views

Beginner Week 1: Mario brick problem

Please can someone assist me! I have been stuck on this for a few hours. I can't seem to make the "#" print and loop to resemble a pyramid. I tried many different ways I could figure out but no ...
0
votes
1answer
53 views

CS50 Terminal saying there's error in code that isn't there - More Comfortable Mario

Whenever I type Make Mario into the Terminal for the "More Comfortable" Mario.c assignment in Week 1, it keeps telling me I have an error on 13:9 - but there's nothing typed on 13:9. I'm a bit ...
0
votes
1answer
86 views

PSET 1 - Mario More (and less) timed out while waiting for program to exit

I have written the code that makes the pyramid exactly how I am supposed to make it look. When I try it on my local computer, it works, but check50 doesn't agree. check50 displays "timed out while ...
0
votes
1answer
163 views

PSET 1 Less Comfortable Mario (Right Sided Pyramid) Got it right by luck, don't understand what I coded

So after fiddling with this for about 2 days, I managed to get a working code that gives me the result I wanted, but the last part was pure luck and frustration as I entered random variables to see ...
0
votes
1answer
22 views

PSET 1 - Where I have to make my answer to Mario PSET?

I am starting to write my code for Mario but I am lost. Where do I have to write it in the MarioCS50 LAB, or I have to create a new Sandbox? Thanks!
0
votes
1answer
46 views

Mario Less Loops doubt and code review

I have attempted the PSET 1 of 2020 CS50x and have a couple of doubts. Could someone check if the following code for Mario less one is correct. If it is I also had a question that what should I put ...
0
votes
0answers
28 views

Week 1 Super Mario Level 2

All, I have Mario built if I input numbers 1-8. However I can't get it to run a second time or re-run if I put in a number like 9. I think I need to have a loop to return it to the top. Have tried ...
0
votes
1answer
235 views

Mario: too few arguments to function call

I'm getting the error "too few arguments to function call, at least argument 'format' must be specified. It calls out the line for "h = get_int()" I've been looking all over for the answer and even ...
0
votes
1answer
73 views

pset1 submission issues

Hi I submitted pset1 mario and only got 65%. I went back to try and fix any issues to get a higher percentage but i just keep getting a lower % each time. I've tried to used check50 to check the code ...
1
vote
1answer
129 views

CS50 mario pset 1 error: expected '(' after 'do/while'

Here is my code: #include <cs50.h> #include <stdio.h> int main(void) { int n; do { printf("height: "); n = get_int(" "); } while { (n < ...
0
votes
1answer
38 views

Prompt a user for a number. My code has an endless loop

i am trying to build a code in which the user should input a number between 1-5. In any other case the program should request the user to input a new number. My problem is that the program is going ...
0
votes
1answer
177 views

Stuck at pset 1 mario problem

I'm Stuck at the PSET 1 problem of CS50. for height 3, my output is coming as ..# ..## ..### Can any peers or experts, look into my code and help me out. [EDIT: code removed for Honor Code ...
0
votes
1answer
305 views

Pset 1 mario (less comfortable)

I've been working on this problem for days and I can't figure out how to print the right side of the pyramid. I"m able to print the left side, preceded by a space (denoted by "y) and one hash. I've ...
0
votes
1answer
117 views

pset 1 Mario code starts with an empty row

I think I got most of it already but I have one issue that I don't see how to solve. If I make the height 8 (for example) it'll print 1 empty row first and then 7 rows with hashes, the last row will ...
0
votes
1answer
440 views

:( rejects a height of 9, and then accepts a height of 2 expected exit code 0, not 2

I have done my mario.c all correct but the cs50 check says: ':( rejects a height of 9, and then accepts a height of 2 expected exit code 0, not 2' Why I have this problem? Idon't understend. When I ...
0
votes
1answer
112 views

CS50; PSet1; Don't know how to connect for loop with user's input + expected identifier or '(' error

I don't know how to properly connect user's input part and for-loop(which is incorrect) in this program. I was seeking for how to do this but didn't find anything useful. Here are my code: #include &...
0
votes
1answer
286 views

MarioLess - declaration shadows a local variable error

Any suggestions on how to fix this error? "mario.c:10:14: error: declaration shadows a local variable" Code sample below. Thanks in advance! #include <cs50.h> #include <stdio.h> int ...
0
votes
1answer
106 views

Can’t see my error on Mario for loop, rows won’t execute!

I’ve gotten stuck on the Less Comfortable Mario set: the height input portion works, but the loop does not execute. I really wanted to figure this out on my own, but I’ve been stuck for days! Please ...
0
votes
1answer
557 views

I keep getting error: use of undeclared identifier 'n' when trying to compile mario.c. I am new to coding, my code is shown below

#include <cs50.h> #include <stdio.h> int get_positive_int(string prompt); int main(void) { { int i=get_positive_int("Height:"); } for (int i = 1; i < n; i++) ...
0
votes
1answer
375 views

Struggling with Mario (less comfortable) loop conditions

Been struggling with this a few times now and have inserted some additional printf commands to try and understand what's going on with the variables used to control my loops (please see instructions, ...
1
vote
1answer
594 views

Doing mario.c less comfortable one step at a time

Like many others here I am completely new to coding. No experience whatsoever. I have been busy with the less comfortable Mario.c for a while now, trying to understand what is going on every step of ...

1
2 3 4 5
10