Home » Python Programming

Python Programming

Number of Questions: 11

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

1. The Python program below has an error so the program will not run. What kind of an error is this?

Note: This kind of error occurs when the code does not follow the rules expected by the programming language.

2. In the studentaverage.py program shown in question #1 above, what is the data type of the variables stud01stud02, and stud03?

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

3. In the studentaverage.py program shown in question #1 above, what is the data type of the variable average?

4. What is the error in the studentaverage.py program shown in question #1 above?

5. Which of the following variables are invalid?

name

house1

Xplayer

student_grade

3times

student#1

6. Give the result of each of the following arithmetic expressions.

a. 19 % 3

b. 19 / 3

c. 19 // 3

d. 2 ** 5

e. 5 != 4

7. What is the data type of the variable x in the Python program below?

8. Give an example of what would appear if you ran the program in question #7 below. Be sure to include an input value.

9. The conditional statement below uses an if statement to check if the value of the variable is greater than zero. What is the datatype of the expression num > 0 ?

if num > 0:

print (“greater than zero”)

10. What is the value of the variable num3 after the statement in line 3 has been executed? Which message will be output by the if else statement, line 5 or line 7?

line 1: num1 = 27

line 2: num2 = 6

line 3: num3 = num1 % num2

line 4: if num3 > 3:

line 5:  print (“greater than 3”)

line 6: else:

line 7:  print (“not greater than 3”)

11. View the output of Running 1 and Running 2 for the Python program below and then fill in the blanks for the missing code in line 6 to line 9.

Running 1

Math Test

3 * 4 =

What is the answer? 12  <- The 12 is entered from the keyboard by the user while the program is running

You answer is correct

Running 2

Math Test

3 * 4 =

What is the answer? 7  <- The 7 is entered from the keyboard by the user while the program is running

Wrong. The answer is  12

line 1: print (“Math Test”)

line 2: num1 = 3

line 3: num2 = 4

line 4: print (num1,”*”,num2,”=”)

line 5: x = int(input(“What is the answer? “))

line 6: if (___________):

line 7:     _____________________________

line 8: else:

line 9:     _______________________

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Live Chat+1 763 309 4299EmailWhatsApp

We Can Handle your Online Class from as low as$100 per week