Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE PYTHON, ANSWER QUESTION WITH CODE AND SHOW OUTPUT, RIGHT CLICK AND OPEN IMAGE IN NEW TAB TO MAKE LARGER 2) Write a punishment automation

USE PYTHON, ANSWER QUESTION WITH CODE AND SHOW OUTPUT, RIGHT CLICK AND OPEN IMAGE IN NEW TAB TO MAKE LARGER

image text in transcribed

2) Write a punishment automation program in Python that does the following (15 points): a. Ask the user to enter a sentence and the times a sentence should be repeated b. The program should write the sentence (with a line break) the number of times specified by the user to a file called "CompletedPunishment.txt" c. Example: i. The user enters this for the sentence: I will not sleep in class ii. The user enters this for the number of repeats: 100 iii. The program should write "I will not sleep in class" 100 times to "CompletedPunishment.txt

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions