Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# 1 . Create a variable named num _ 1 and assign 2 8 to it ( 1 pt . ) . # 2 .

# 1. Create a variable named num_1 and assign 28 to it (1 pt.).
# 2. Create a variable named num_2 and assign 63 to it (1 pt.).
# 3. Add num_1 to num_2 and store it in ans_one, print ans_one (2 pts.).
# 4. Subtract num_1 from num_2 and store it in ans_two, print ans_two (2 pts.).
# 5. Multiply num_1 by num_2 and store it in ans_three, print ans_three (2 pts.).
# 6. Divide num_2 by num_1 and store it in ans_four, print ans_four (2 pts.).
# 7. Use the integer division operator to divide num_2 by num_1 and store it in
ans_five, print ans_five (2 pts.).
# 8. Return the remainder of num_2 divided by num_1 and store it in ans_six, print
ans_six (2 pts.).
# 9. Use the is_integer method to check if num is an integer and print the value
returned by the method (2 pts.).
num =28.6 # DO NOT DELETE OR MODIFY THIS LINE OF CODE
# 10. Use the pow function to print out 6 raised to the power of -4(1 pt.).
# 11. Print num_3 so that 3 decimal places are displayed and it is grouped by
thousands (1 pt.).
num_3=987654321.123456789 # DO NOT DELETE OR MODIFY THIS LINE OF CODE
# 12. Write a print statement using an f-string that prints out the following
sentence using the variables defined below.
# In 2020, Australia had a population of 25,660,000 and a life expectancy of 83.2
years. The round function
# should not be used (2 pts.).
year =2020 # DO NOT DELETE OR MODIFY THIS LINE OF CODE
population =25660000 # DO NOT DELETE OR MODIFY THIS LINE OF CODE
expectancy =83.2031 # DO NOT DELETE OR MODIFY THIS LINE OF CODE

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

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions