This would have been a good opportunity to also introduce the INPUT$ function... Also I don't get how your grades work, shouldn't a test-score of 50 be a D- and 49 and less be Fail? ;)
yeah! here is another example. is this right. cls input "enter the marks of the student"; M% select case m% case is > = 85 print "a grade" case is >=60 print "b grade" case is >=50 print "c grade' case else print "d grade" end select end
Good! I made some improvements in it, see how is it! CLS INPUT "Enter The Marks of The Student"; M SELECT CASE M CASE IS >= 85 PRINT "Good! It's A" CASE IS >= 60 PRINT "Not Bad, But it can be better if you work on it!" CASE IS >= 50 PRINT "Meh, Your parents won't be happy" CASE IS >= 40 PRINT "Dude, really bad!" CASE IS >= 20 PRINT "DONUT" END SELECT END
Ucase$ is a function that converts strings to uppercase. By converting the case, and using that case in the program, we remove the case sensitivity of the program. This way "a" is the same as "A".
Why do i get type mismatch, sorry it's in my language. CLS INPUT "Upisi ocjenu "; a$ SELECT CASE a$ CASE IS >= 5 PRINT "Odlican" CASE "4" PRINT "Vrlo dobar" CASE "3" PRINT "Dobar" CASE "2" PRINT "Onako" CASE "1" PRINT "Los" CASE ELSE PRINT "Ne zajebaji ako hoces da znas ocjenu" END SELECT
2:03 Why just not : ------------------------------------------------------ DIM keyPressed AS STRING INPUT "Enter a key : ", keyPressed PRINT keyPressed; " was entered" ------------------------------------------------------ ?
a$ is a string. 5 is an integer. This causes a type mismatch. Change a$ to an integer a% and remove " " from the numbers to make them an integer also.
Thanks i was wonedering
are all compiled .exe files from qb64 compatible with native MS-DOS 6.22?
your videos have helped me so much in high school thank you !!
True
Helped such a Computer theory hater to get it perfectly inside my head 😃 Thank you School Freeware
How would you prevent the user from putting in a different number.
Do qbasic have break and continue statements
This would have been a good opportunity to also introduce the INPUT$ function...
Also I don't get how your grades work, shouldn't a test-score of 50 be a D- and 49 and less be Fail? ;)
yeah! here is another example. is this right.
cls
input "enter the marks of the student"; M%
select case m%
case is > = 85
print "a grade"
case is >=60
print "b grade"
case is >=50
print "c grade'
case else
print "d grade"
end select
end
Good! I made some improvements in it, see how is it!
CLS
INPUT "Enter The Marks of The Student"; M
SELECT CASE M
CASE IS >= 85
PRINT "Good! It's A"
CASE IS >= 60
PRINT "Not Bad, But it can be better if you work on it!"
CASE IS >= 50
PRINT "Meh, Your parents won't be happy"
CASE IS >= 40
PRINT "Dude, really bad!"
CASE IS >= 20
PRINT "DONUT"
END SELECT
END
what is the meaning of print between the statements
It's for a newline
can you show us how to do loops? and if its looped how to put in an exit?
I can't understand ucaae$ please help me
Ucase$ is a function that converts strings to uppercase. By converting the case, and using that case in the program, we remove the case sensitivity of the program. This way "a" is the same as "A".
@@SchoolFreeware thanks sir , now I got it .
i understand using case select but i see no purpose for using it when there's if and then statements
Zam Wam this saves time If you are making a menu for example
@Tera Oh i get it, so its there so you don't pull a yandredev on your code
Really Helped me
Why do i get type mismatch, sorry it's in my language.
CLS
INPUT "Upisi ocjenu "; a$
SELECT CASE a$
CASE IS >= 5
PRINT "Odlican"
CASE "4"
PRINT "Vrlo dobar"
CASE "3"
PRINT "Dobar"
CASE "2"
PRINT "Onako"
CASE "1"
PRINT "Los"
CASE ELSE
PRINT "Ne zajebaji ako hoces da znas ocjenu"
END SELECT
Nemas pojma bogami.
why do you add
PRINT
PRINT
A PRINT is like making a new line (Hitting the Enter Key). PRINT PRINT is like hitting the Enter Key twice.
it is done for seperation of lines
Okay thanks for help.
2:03
Why just not :
------------------------------------------------------
DIM keyPressed AS STRING
INPUT "Enter a key : ", keyPressed
PRINT keyPressed; " was entered"
------------------------------------------------------
?
display following pattern
A
E A C
P E A C E
PLZ IN 5 MINS
I am of 12 but I am understanding your video
Ayy