3-3 Assignment
.docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
140
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
2
Uploaded by AmbassadorDolphinPerson1004
3-3 Assignment: Introduction to Pseudocode and Flowcharts
Pseudocode:
o
Declare two float variables: work_hours and pay_check
o
Print “Enter the number of work hours”
o
The input would go into the variable work_hours
o
Insert an if-else statement:
IF (work_hours < 0):
print “invalid Input”
ELSIF (work_hours <= 40):
CALCULATE
pay_check = work_hours * 20
print pay_check
ELSE
CALCULATE
pay_check = 40 * 20 + (work_hours – 40) * 30
print pay_check
o
Output should result in the system doing the math with the inputted data and tell
the company what the paycheck should be.
End
Print pay_check
Calculate
pay_check = 40*20+(work_hours-40)*30
Print pay_check
Calculate
pay_check = work_hours*20
N
o
Y
e
s
IF
(work_hours
<= 40)
Read work_hours
Enter work_hours
work_hours
pay_check
Start
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
PEN and PAPER Debugging the Pseudocode. Hand write the correct pseudocode using pen and paper.
arrow_forward
calendar
allowed language: C Languange
The output and input should be the same as the samples.
arrow_forward
Identif the data type of x after the statment executes: x = 7 // 2 + 3
int
float
str
arrow_forward
✓ Allowed languages
C
Problem Statement
Create a program that will determine whether a triple can
generate a triangle and if it can generate a triangle, determine
if the triangle is scalane, isosceles or equilateral.
Input
Input starts with a number N and is followed by N triples
(a,b,c), where a, b and c are natural numbers
Output
The output will be: equilateral, if the triangle formed is an
equilateral triangle, isosceles, if the triangle formed is
isosceles and scalene if the triangle formed is scalene. Output
no triangle is formed, if no triangle can be formed.
Limits
1
arrow_forward
C++ Code
arrow_forward
i uploaded the screenshot
please help me to do pseudocode And do flowchart
should be in c++
arrow_forward
Gemple of Big O Notation togr x
823608cmid 602928page=1
You are required to write pseudocode statements for the following:
a) Write the comment "This is how you write a comment in
pseudocode
b) Acquire the input "name" from the user.
c) Show the output" hello user" to the user.
E A-B IT:- /-
arrow_forward
C# language
no lopping
use decision making and condtional operator
arrow_forward
C programing language
The following code should print the values 1 to 10. Visualize the code and if there is an error or a statement need to be corrected apply the correction.n = 1;while ( n < 10 ) printf( "%d ", n++ );
arrow_forward
Create flowchart
arrow_forward
2. Rolling Dice Simulator in C
Difficulty:
Requirements:
• As the title suggests, this question involves writing a program that simulates rolling dice. When the program runs, it will randomly choose a number between 1 and 6. (Or whatever other integer you prefer — the number of sides on the die is up to you.)
• The program will print what that number is.
• It should then ask you if you’d like to roll again.
• For this question, you will need to set the min and max number that your dice can produce. For the average die, that means a minimum of 1 and a maximum of 6.
. Use online C compiler HD to do this question, use while loop to get this done
. In 150 words explain your code or program.
arrow_forward
C#
arrow_forward
allowed language: C language
arrow_forward
Write assignment statements that perform the following operations with the variablesa, b, and c .A) Adds 2 to a and stores the result in b .B) Multiplies b times 4 and stores the result in a .C) Divides a by 3.14 and stores the result in b .D) Subtracts 8 from b and stores the result in a .E) Stores the value 27 in a.F) Stores the character ‘K’ in c .G) Stores the ASCII code for ‘B’ in c .
arrow_forward
Question
Write the pseudocode for a program that will
process attendance records of CA students. The
students attend college five days a week. Input
values are the student's name, number, and the
time in and time out for each day of the week (i.e.
five different times in and times out must be input).
If a student attends college more than 36 hours in a
week, a congratulatory message is printed. If a
student attends college less than 30 hours in a
week, a warning message is printed. The output for
each student is the name, hours, and the
appropriate attendance message. Processing
continues until a student number of zero is input.
Assume that students always check in and out on
the hour. Therefore, timeln and timeOut will be
integer variables (i.e. they represent whole hours,
and minutes are ignored).
arrow_forward
C#
arrow_forward
prime factorization
allowed language: C Languange
The output and input should be the same as the samples.
arrow_forward
Domino's Time
Function Name: dominosTime()
Parameters: N/A
Returns: None
Description: During the summer, you ordered a lot of food from Domino's. Pizzas are $12, an
order of pasta is $6, and chicken wings are $8. Write a function that asks the user how many
of each food item they would like, and then print a response telling them what their order to-
tal will be. The order total should be an integer.
>>> dominosTime()
How many pizzas do you want? 3
How many orders of pasta do you want? 2
How many orders of chicken wings do you want? 2
By ordering 3 pizzas, 2 orders of pasta, and 2 orders of chicken wings, your
order total comes to $64.
arrow_forward
C programming language
without using arrays
arrow_forward
Write assignment statements that perform the following operations with the variables a and b (Python)A. Adds 2 to a and stores the result in bB. Multiplies b times 4 and stores the result in aC. Divides a by 3.14 and stores the result in bD. Subtracts 8 from b and stores the result in a
arrow_forward
C# oop function
arrow_forward
ne
nouncements
2. Days of the Week
odules
• Write a program that asks the user for a number in the range of 1 through 7. The program should display the corresponding day of the week, where 1- Monday, 2 - Tuesday and so
forth. If the user types in a 6 then "Saturday" should be printed on the screen. For help with Input statements see: Input Function
izzes
• The program should print an error message if the user enters a number that is outside the range of 1 through 7. For help with If statements and conditions see the following pages:
If-Else Statements and Operators.
• Name the source code file yourName_HW4 1.py.
• Test and run the program. Capture the output console and save it as an image file named yourName_HW3_output4_1.jpg.
• Submit the py and the image files through Canvas.
rades
yllabus
Zoom
Library Research
Guides
3. Roman Numerals
• Write a program that displays the Roman numeral version of a decimal number entered. The program should prompt the user to enter a number from 1 to…
arrow_forward
True or False To increment a variable means to increase its value and to decrement a variable means to decrease its value.
arrow_forward
Define the term " pass by value " .
arrow_forward
Python3 code required
arrow_forward
Speeding Violation Calculator - MUST BE WRITTEN IN PSEUDOCODE
Design a program that calculates and displays the number of miles per hour over the speed limit that a speeding driver was doing. The program should ask for the speed limit and the driver’s speed. Validate the input as follows:
The speed limit should be at least 20, but not greater than 70.
The driver’s speed should be at least the value entered for the speed limit (otherwise the driver was not speeding).
Once correct data has been entered, the program should calculate and display the number of miles per hour over the speed limit that the driver was doing.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Related Questions
- PEN and PAPER Debugging the Pseudocode. Hand write the correct pseudocode using pen and paper.arrow_forwardcalendar allowed language: C Languange The output and input should be the same as the samples.arrow_forwardIdentif the data type of x after the statment executes: x = 7 // 2 + 3 int float strarrow_forward
- ✓ Allowed languages C Problem Statement Create a program that will determine whether a triple can generate a triangle and if it can generate a triangle, determine if the triangle is scalane, isosceles or equilateral. Input Input starts with a number N and is followed by N triples (a,b,c), where a, b and c are natural numbers Output The output will be: equilateral, if the triangle formed is an equilateral triangle, isosceles, if the triangle formed is isosceles and scalene if the triangle formed is scalene. Output no triangle is formed, if no triangle can be formed. Limits 1arrow_forwardC++ Codearrow_forwardi uploaded the screenshot please help me to do pseudocode And do flowchart should be in c++arrow_forwardGemple of Big O Notation togr x 823608cmid 602928page=1 You are required to write pseudocode statements for the following: a) Write the comment "This is how you write a comment in pseudocode b) Acquire the input "name" from the user. c) Show the output" hello user" to the user. E A-B IT:- /-arrow_forwardC# language no lopping use decision making and condtional operatorarrow_forwardC programing language The following code should print the values 1 to 10. Visualize the code and if there is an error or a statement need to be corrected apply the correction.n = 1;while ( n < 10 ) printf( "%d ", n++ );arrow_forwardCreate flowchartarrow_forward2. Rolling Dice Simulator in C Difficulty: Requirements: • As the title suggests, this question involves writing a program that simulates rolling dice. When the program runs, it will randomly choose a number between 1 and 6. (Or whatever other integer you prefer — the number of sides on the die is up to you.) • The program will print what that number is. • It should then ask you if you’d like to roll again. • For this question, you will need to set the min and max number that your dice can produce. For the average die, that means a minimum of 1 and a maximum of 6. . Use online C compiler HD to do this question, use while loop to get this done . In 150 words explain your code or program.arrow_forwardC#arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning