help!

For students who are taking a programming course, may be restricted in what they can use, or have other unusual limitations on solving their task.

help!

Postby ozzy » Fri Sep 16, 2016 2:08 am

I know theres some teenie tiny problem on line 8. just cant find it!!!!! please help!!!
btw, this is to guess a person's secret number.
Code: Select all
x=50
asd=0
print('pick a number between 1 and 100')
print('h if high, l if low, c if correct')
while asd==0:
    z=input('is '+guess+' you number?')
    if z == 'c'
        asd=1
    elif z=='h':
        guess=guess-(0.5*guess)
    elif z=='l'
        guess=guess*0.5+guess
    else:
        print("sorry try again")
print('I got it')
ozzy
 
Posts: 1
Joined: Fri Sep 16, 2016 2:05 am

Re: help!

Postby micseydel » Fri Sep 16, 2016 4:42 am

You missed the colon on line 7.
Due to the reasons discussed here we will be moving to python-forum.io on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
micseydel
 
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to Homework

Who is online

Users browsing this forum: No registered users and 2 guests