Question: PYTHON PROGRAMMING!!! #1 Ask the user to enter a number between 1 and 10 (inclusive) num = input('Enter a number.') if float(num) >= 1 and

PYTHON PROGRAMMING!!!

#1 Ask the user to enter a number between 1 and 10 (inclusive)

num = input('Enter a number.')

if float(num) >= 1 and float(num) <= 10

#2 Ask the user to enter the word 'Number' as shown.

txt = input('Enter the word Number')

#3 Ask the user to enter 'True' or 'False'.

b = input('Enter 'True' or 'False')

#4 If the user entered a number between 1 and 10 (inclusive),

#print 'You satisfied the first condition.'

if float(num) >= 1 and float(num) <=10:

print('You satisifed the first condition')

#5 if the user entered the word 'Number' as shown,

#print 'You satisfied the first condition'

if txt == 'Number':

print('You satisfied the first condition')

#6 if the user satisfied BOTH condition, print

#'You satisfied at least one condition.'

#7 if the user satisfied ONE condition, print

#'you satisfied at least one condition

# 8. If the user entered a number between 1 and 5 (inclusive),

# print 'Your number is between 1 and 5.' Otherwise, print

# 'Your number is NOT between 1 and 5.'

# 9. Use one if, elif, and else clause for this problem.

# If the user entered a value less than 0 (not inclusive),

# print 'Invalid input.' Otherwise, if the number is

# less than 10, print 'Your number is between 0 and 10.'

# Otherwise, print 'Your number is greater than 10.'

# 10. You will need to cast b as a bool() for this problem.

# If the user entered a number NOT equal to 0 and

# also entered 'Number' and also entered a value of

# 'True' for b,

# print 'Comparisons, operators, and block code, oh my!'

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!