Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please can you answer these five questions ,and program them using phyton.Thank you so much Exercise 1: Write the Python code that assigns True to

please can you answer these five questions ,and program them using phyton.Thank you so much
image text in transcribed
Exercise 1: Write the Python code that assigns True to the fever variable i temperatuwe is greater than 98.6 Ginsert comments) Exercise 2: The variables namel and came2, have been assigned integer values, that were entered as strings by using the input function write a fragment of the Python code that assis the larger of their values to first insert comments) Exercise 3: Write an iflelse statement that compates age with 65 adds I to senior citizens age is greater than or equal to 65 prints the message your are a senior and displays the age Adds 1 to non_seniors, prints the message you are not senior and displays the age otherwise Exercise 4: Use two variables counter and total to write a for loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. Thus, your code should put 1*1 + 2*2 + 3*3+-+49*49-50*50 into total Use only variable counter and total (insert comments) Exercise 5: Determine all the perfect numbers for all the 4 or 5-digits integer numbers (such as 6233 or 13831), display a message that indicates the number is a perfect number and sho displays its divisors and print their divisors (insert comments). For example 28 is a perfect number 28 divisors are: 1.2. 4.7.14

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

How is the severity of a breach of contract evaluated?

Answered: 1 week ago

Question

=+ Is secondary industrial action common and/or legal?

Answered: 1 week ago