Hi Welcome to Just Answer, It will be my pleasure to help you.
What version of Python are you using ?
and can you please help me understand what are you writing this program for ?
I mean can you give me your assignment or homework details
It's quite lengthy.I need to write a program that accepts a name but will not accept a blank input for name.It needs to accept a user input rating from 0-10. Then it either returns a statement that multiplies the laugh# XXXXX the rating number or an error message. It all works except the rating must be limited to 0 to 10 inclusive.
Pythin code on the question text is not formatted well
can you send me your .py file ?
Can you please go to www.wikisend.com and upload your file ? Once you do that you will get a page that has the "File ID" and "Download Link". Copy the "Download Link" or "File ID" and please paste it in your reply here.
Can't do that. I have to go to work. Thought this might be an easy way to get a simple answer to my homework question.
yes, but your code is not formatted very well...and python is very much space sensitive
Let me give it a shot regardless then, if you don't want to upload code
try this ...
rating=int(raw_input('Enter the evilness rating: '))
that should work
let me know what you find
That will not help at all. I need to limit the numbers that can be input to 1 -10
didn't realise you need to do that
CAn I write code to prompt user to re-enter if its a invalid number ?
If it's an invalid number it should say "Sorry that rating is invalid"
working on adding that code
My teacher suggests a loop sentinel, but not necessary.
I have this ready
let me send you a link
Please download the program from this Answer_Link
Let me know if you still have questions
There is a RAW Paste data in section below the formatted section on link I gave you, which should help
There is a link answerlink but I can't find any information
can you click on that link please ?
WHat do you see when you open that link ?
Let em paste it here in this chat
there you go
Did it help ?
you still with me ?
yes, but I can't seem to figure out the formatting.
When I click on the link if something comes up it;s all java
well thats why I pasted you the code above
Did that work ?
No because I can't figure out the indenting.
Well now you know why I was asking you for a python file my friend !
Anyways, Try this LINK
Python code should be there
let me know if you still have issues
Did it work ???
Sorry but it totally doesn't work now. I f you run the program it gives me an error message for any rating number now. I do know that the rating changes must be done within the same while loop to work. Like I said my teacher suggests a loop sentinel.
hmm...are you sure you are running my program ?
Yes. Copy and paste.
Let me give you a different link
Try this LINK
Wait a second, I see the problem...why it works some times and why it does not
I realize that programmers don't usually use idle, but there must be some way to try out the script.If you enter Bob for the name and 5 for the rating. It should print My name isXXXXX Insead I recieve the error message using your script.
ok...Its because of different version of Python...
This should work with Python 2.7
Okay, it works great now, BUT it still does not respond correctly if you enter alpha characters into the rating. It should only accept numbers 0 through 10 or return an error message. That's why I believe it cannot be accomplished with 2 separate while statements.
let me look
Can you tell me what you did. I don't see the difference. My teacher said 2 separate while loops would not work but it does. And if it works I get the credit. This was the only assignment I couldn't figure out this quarter. thanks.
any luck ?
I am nto sure why your teacher would say two separate while loops won't work
It's good, bit can you explain the last change?
I don't have all your 'requirement's or task details, but from what you ahve told me, it works
yes I can
I am using rating.isdigit() method to find out if its a digit
and this method works only on strings
not on ints
so the conversion to integer should happen after this check is complete
We can do this with one while loop too , if thats what you would like
but the messages may get tricky to handle
No, it's good.
Thanks we are done.
I hope you get good grade
Please start your question with "For ATLProg only" if you would need any help on Programming related questions in future.
Please remember to hit the Green accept button if you think my answer helped, so that I get paid for the time spent. I would obviously continue to help you if you have any further questions.
You may be hearing from me.