Computer Science Canada
Programming C, C++, Java, PHP, Ruby, Turing, VB
Username:
Password:
Register
Wiki
Blog
Search
Turing
Chat Room
Members
A quick quiz
Index
->
Programming, Turing
->
Turing Help
Author
Message
qmanjr5
Posted:
Mon Nov 30, 2009 7:10 pm
Post subject: A quick quiz
What is it you are trying to achieve?
A quiz with a score that will go up or down depending on your correct questions
What is the problem you are having?
Can't figure out quite how to do this
Describe what you have tried to solve this problem
I've asked my friends.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I've only done a TINY bit, but, here it is.
Turing:
var
score
:=
int
=
0
var
answer1
:=
int
=
2
put
""
get
answer1
if
answer1
=
"2"
then
procedure
correct
end
procedure
correct
score +
1
Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Zren
Posted:
Mon Nov 30, 2009 7:39 pm
Post subject: Re: A quick quiz
Well first off. procedures should be declared before their used, and deffinitly not in a loop. Try sorting you code like this:
Turing:
%Declare Variables
var
number:
int
%Procedures and Functions
procedure
incrementNumber
number +
=
1
end
incrementNumber
%Initialize Variables
number
:=
0
% Main Program Code
put
"I'm a number "
,number
incrementNumber
put
"Now I'm a number "
,number
Honnestly your missing alot of the programming basics. Try running through the first few subjects of the Essentials in the
Turing Walkthrough
qmanjr5
Posted:
Mon Nov 30, 2009 7:59 pm
Post subject: RE:A quick quiz
And I shall.
Thank you.
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
Index
->
Programming, Turing
->
Turing Help
Page
1
of
1
[ 3 Posts ]
Jump to:
Select a forum
CompSci.ca
------------
- Network News
- General Discussion
General Forums
-----------------
- Hello World
- Featured Poll
- Contests
Contest Forums
-----------------
- DWITE
- [FP] Contest 2006/2008
- [FP] 2005/2006 Archive
- [FP] 2004/2005 Archive
- Off Topic
Lounges
---------
- User Lounge
- VIP Lounge
Programming
--------------
- General Programming
General Programming Forums
--------------------------------
- Functional Programming
- Logical Programming
- C
C
--
- C Help
- C Tutorials
- C Submissions
- C++
C++
----
- C++ Help
- C++ Tutorials
- C++ Submissions
- Java
Java
-----
- Java Help
- Java Tutorials
- Java Submissions
- Ruby
Ruby
-----
- Ruby Help
- Ruby Tutorials
- Ruby Submissions
- Turing
Turing
--------
- Turing Help
- Turing Tutorials
- Turing Submissions
- PHP
PHP
----
- PHP Help
- PHP Tutorials
- PHP Submissions
- Python
Python
--------
- Python Help
- Python Tutorials
- Python Submissions
- Visual Basic and Other Basics
VB
---
- Visual Basic Help
- Visual Basic Tutorials
- Visual Basic Submissions
Education
-----------
- Student Life
Graphics and Design
-----------------------
- Web Design
Web Design Forums
---------------------
- (X)HTML Help
- (X)HTML Tutorials
- Flash MX Help
- Flash MX Tutorials
- Graphics
Graphics Forums
------------------
- Photoshop Tutorials
- The Showroom
- 2D Graphics
- 3D Graphics
Teams
------
- dTeam Public
Style:
Appalachia
blueSilver
eMJay
subAppalachia
subBlue
subCanvas
subEmjay
subGrey
subSilver
subVereor
Search:
You can syndicate this boards posts using the file
backend.php
or view the
topic map using sitemap.php.
Terms of Use
|
Privacy Policy