CLC:\WINDOWS\system32\cmd.exe Tail Head Tail Head Head Head Tail Tail Head Head Tail Tail Tail Tail Tail Tail Tail Tail Tail Head Head Head Head Tail Tail Tail Head Head Tail Head Tail Head Head Tail Tail Head Tail Tail Head Tail Head Head Tail Tail Head Head Tail Tail Tail Tail Head Head Head Head Tail Head Head Tail Tail Head Head Tail Head Head Head Tail Head Head Head Tail Head Tail Tail Tail Head Tail Head Head Head Tail Tail Tail Tail Head Tail Head Head Head Tail Head Head Tail Tail Tail Tail Tail Tail Head Head Tail Total number of times the coin was flipped: 100 Total Heads: 48 Total Tails: 52 The Longest run of Head is: 4 The Longest run of Tail is: 9 Press any key to continue .
Added by Domingo F.
Close
Step 1
Step 1: We need to simulate the flipping of a coin 100 times and count the number of heads and tails. Show more…
Show all steps
Your feedback will help us improve your experience
Madhur L and 70 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a PYTHON program to calculate the bill amount for an item given its quantity sold, value, discount, and tax. The user is to enter these: Enter the quantity of items sold: Enter the value of the item: Enter the discount percentage: Enter the tax: Formulas: amount = quantity X value discount amount = amount X discount/100 subtotal = amount - discount amount tax amount = subtotal X tax/100 total amount = subtotal + tax amount The output should look like this: >>> Enter the quantity of items sold: 80 Enter the value of the item: 100 Enter the discount percentage: 10 Enter the tax: 14 *********BILL********** Quantity sold: 80.00 Price per item: 100.00 ----------------- Amount: 8,000.00 Discount: - 800.00 ----------------- Discounted Total: 7,200.00 Tax: + 1,008.00 ----------------- Total amount to be paid: $ 8,208.00 >>>
Madhur L.
Write a program in Python to calculate and display the sum of all odd numbers in the list
Shelayah R.
Submit FileIO.py Create a Python Program the reads in the file: Input.txt download and outputs to a file, each line of the input file preceded by the line number, and then the total number of lines in the file. name the output file: output.txt. example output: line 1: dogs barkline 2: cats meowline 3: cows moooline 4: ducks quackline 5: people talkline 6: and doves crytotal of: 6 lines read from input file
Liam H.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD