Pythin Loops

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.

Pythin Loops

Postby azg5662 » Mon Sep 26, 2016 12:41 am

Write a program that continues to ask the user for a number between one and eleven (inclusive) until the total of the numbers is greater than 21. Be sure to reject any number that is not between 1 and 11 (inclusive). For example:

Please enter a number between 1 and 11: 11
Please enter a number between 1 and 11: 8
Please enter a number between 1 and 11: 2
Please enter a number between 1 and 11: 1
The total is 22
Last edited by micseydel on Mon Sep 26, 2016 1:58 am, edited 1 time in total.
Reason: Initial post lock.
azg5662
 
Posts: 1
Joined: Mon Sep 26, 2016 12:37 am

Re: Pythin Loops

Postby micseydel » Mon Sep 26, 2016 1:59 am

You've posted your homework question, but not your question for us? What have you tried?
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

cron