Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started