Win a copy of Head First Go this week in the Go forum!

since Jul 25, 2016

Cows and Likes

Cows

Total received

3

In last 30 days

0

Total given

0

Likes

Total received

10

Received in last 30 days

0

Total given

4

Given in last 30 days

0

Forums and Threads

Scavenger Hunt

Ranch Hand Scavenger Hunt

Greenhorn Scavenger Hunt

yes you are right...im just not smart enough...have a nice day!!!

2 months ago

i just cant get around how to do a guess the number with a while loop

here is my code

but it just loops

i knopw you can do this with simple if statements but trying to use a while loop

here is my code

but it just loops

i knopw you can do this with simple if statements but trying to use a while loop

3 months ago

hi jeanne

yes i realise that i dont need every value stored in a variable

i have just created a total

and total = total + numberAdded

or total += numberAdded

trying to work out how to get the highest value in the numbers now

yes i realise that i dont need every value stored in a variable

i have just created a total

and total = total + numberAdded

or total += numberAdded

trying to work out how to get the highest value in the numbers now

3 months ago

really battling with the logic in this for loop exercise

Prompt the user for the number of numbers they want to enter. Read in each of the number. When all the number have been entered display: the average, the highest number, the number that were divisible by 3, and the total

what i cant work out is how to store each user input in a variable within the loop and not allowed to use lists

any push in the right direction would greatly be appreciated

Prompt the user for the number of numbers they want to enter. Read in each of the number. When all the number have been entered display: the average, the highest number, the number that were divisible by 3, and the total

what i cant work out is how to store each user input in a variable within the loop and not allowed to use lists

any push in the right direction would greatly be appreciated

3 months ago

are there exercises on this site?

looking for some to do with if else if else

i had some good ones about drivers ages and years driving and whether they qualified for insurance

looking for some online but havent found anything good

looking for some to do with if else if else

i had some good ones about drivers ages and years driving and whether they qualified for insurance

looking for some online but havent found anything good

4 months ago

thanks jeanne

yes changed or to and ...its working perfect now

so the and checks it as 1 condition

but or is allowing different results in right?

whats up with all the <b> </br> etc never seen it before

yes changed or to and ...its working perfect now

so the and checks it as 1 condition

but or is allowing different results in right?

whats up with all the <b> </br> etc never seen it before

4 months ago

have this question to do

Design and implement a program that will accept a person’s age, number of year driving, and whether or not they drink. The program will determine whether they are eligible for car insurance or not. A person under 22 is not eligible. People 22 and up to 30 are eligible if they do not drink and are driving 3 years or more. People over 30 are eligible if they have at least 6 years driving experience. You need to display an appropriate message to the person who is applying for insurance.

its all working except for over 30 which seems to be running the first if for some reason can somebody please help me understand what is wrong

here is my code

also can somebody tell me how efficient this code is...and how would be the best way to write this...thanks

Design and implement a program that will accept a person’s age, number of year driving, and whether or not they drink. The program will determine whether they are eligible for car insurance or not. A person under 22 is not eligible. People 22 and up to 30 are eligible if they do not drink and are driving 3 years or more. People over 30 are eligible if they have at least 6 years driving experience. You need to display an appropriate message to the person who is applying for insurance.

its all working except for over 30 which seems to be running the first if for some reason can somebody please help me understand what is wrong

here is my code

also can somebody tell me how efficient this code is...and how would be the best way to write this...thanks

4 months ago

also is there a way to add a currency symbol like $ or € to the format so that it puts it before the float

4 months ago

i have a load of strings with floats and ints that need to be formatted to 2 decimal places and moved across the screen

i know that this line formats subTotal to 2 decimal places

is there a way you can use a variable like this

and apply it to multiple variables?

i tried a few things but just got errors

or does this line have to be applied to every line you want to format

like:

i know that this line formats subTotal to 2 decimal places

is there a way you can use a variable like this

and apply it to multiple variables?

i tried a few things but just got errors

or does this line have to be applied to every line you want to format

like:

4 months ago

ok think i have it now

tell me what you think...

tell me what you think...

4 months ago

no doesnt work...please help

4 months ago

actualFreeFlights = teachers - teachers + freeFlights

think this solved it...but please let me know if im right...or did i miss something

thanks

think this solved it...but please let me know if im right...or did i miss something

thanks

4 months ago

now this:

produces this:

how many students?100

how many teachers?100

95

end

its minuses 5 from teacher...and 5 free flights is what it is...i know im close

just cant see it.

produces this:

how many students?100

how many teachers?100

95

end

its minuses 5 from teacher...and 5 free flights is what it is...i know im close

just cant see it.

4 months ago

hi guys

if there are students and teachers flying to Kingston Jamaica for holiday and...

Flights are $297.67 per person travelling

There is one free teacher’s flight for every 20 students

There is no reduction if a free flight isn’t availed of

Any extra teachers pay full price

now the thing is that if there is no discount nothing must print out...so it only prints out the discount when a free flight is available and deducts it from the grand total at the end

so i was trying to work it out on paper first...

when dont you want reductions to print (ie when isnt there one)

a) when there is less than 20 students

b) when there are no teachers

any others?

here is the code i have written so far,but i just cant get my head around how this would work

if there are students and teachers flying to Kingston Jamaica for holiday and...

Flights are $297.67 per person travelling

There is one free teacher’s flight for every 20 students

There is no reduction if a free flight isn’t availed of

Any extra teachers pay full price

now the thing is that if there is no discount nothing must print out...so it only prints out the discount when a free flight is available and deducts it from the grand total at the end

so i was trying to work it out on paper first...

when dont you want reductions to print (ie when isnt there one)

a) when there is less than 20 students

b) when there are no teachers

any others?

here is the code i have written so far,but i just cant get my head around how this would work

4 months ago