Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me create two sources codes in Python for: 1). 1. Write Python statements that declare the following variables: firstN ame of type string

Please help me create two sources codes in Python for:

1). 1. Write Python statements that declare the following variables: firstName of type string and studyHours of type float. Prompt and input a string into firstName and a float value into studyHours.

2.We think students should study for at least 10 hours. Write a Python statement that outputs the appropriate comment for the user.

3. Write a Python statement that output the following lines:

Provided that the user entered John and 4.5.

Hello, John! On Saturday, you will need to study for an additional 5.5 hours for the exam.

Output after running program should be:

Enter your first name: John Enter how many hours you have studied so far: 4.5 Hello, John! On Saturday, you will need to study an additional 5.5 hours for the exam.

*************************************************************************************

Enter your first name: Sam Enter how many hours you have studied so far: 2.5 Hello, Sam! On Saturday, you will need to study an additional 7.5 hours for the exam.

2)

1. Write Python statements that declare the following variables: firstName of type string, payPerHour of type float, and hoursWorked of type float. Prompt and input a string into firstName and a float value into payPerHour and another float value into hoursWorked.

2.. Write a Python statement that output the following lines, provided the user entered John and 10.50 and 16.0. You will get bonus points for formatting the pay rate and salary correctly.

First Name: John Pay Rate: $10.50 Hours Worked: 16.0 Salary: $168.0

Output:

Enter your first name: John Enter your pay rate per hour: 12.5 Enter the number of hours you worked last week: 35.5 First Name: John Pay Rate: $12.50 Hours Worked: 35.5 Salary: $443.75

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

1. Identify three communication approaches to identity.

Answered: 1 week ago

Question

d. Who are important leaders and heroes of the group?

Answered: 1 week ago

Question

3. Describe phases of minority identity development.

Answered: 1 week ago