Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A Black Jack-like program: a program that reads numbers and sums them until the total gets greater or equal to 21. The input sequence ends

A Black Jack-like program: a program that reads numbers and sums them until the total gets greater or equal to 21. The input sequence ends with 0 for the program to be able to stop even if the total sum of all numbers is less than 21.

When the total is greater or equal to 21 : print like Total sum is 24

If 0 is entered and the total is less than 21

: print like Total sum is less than 21 and is equal to 14

Test Case 1

input: 2, 4, 7, 0 output: Total sum is less than 21 and is equal to 13

Test Case 2

input: 9, 9, 5(4, 0 : actually, they can not be entered) output: Total sum

is 23

Draw a flowchart and write a Python code: Use while and else statement, break

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Optimizing Data Collection In Warzones

Authors: Aaget Aamber

1st Edition

B0CQRRFP5F, 979-8869065902

More Books

Students also viewed these Databases questions

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago

Question

10. Discuss the complexities of language policies.

Answered: 1 week ago

Question

1. Understand how verbal and nonverbal communication differ.

Answered: 1 week ago